Open the pack folder
Choose your datapack folder as the working folder in PHPloom and pick Ask first.
A datapack is a good first project. A new player runs one function and receives a few items and a title. Here is how a change travels from your request to a test in your world, with PHPloom editing the files and you deciding at 4 clear points.
Choose your datapack folder as the working folder in PHPloom and pick Ask first.
Write the task in plain words, for example a kit with bread, a sword and a title.
Read every proposed line, accept the ones you want and reject the rest.
In your own world, type /reload, run /function welcome:kit and check each item.
datapacks/welcome2 itemspack.mcmeta6 linesdata/welcome/function/kit.mcfunction+8 linesdata/welcome/function/kit.mcfunction8 lines# data/welcome/function/kit.mcfunction
# Run as a player: /function welcome:kit
say A new player joined the world.
give @s minecraft:bread 8
give @s minecraft:stone_sword 1
give @s minecraft:torch 16
effect give @s minecraft:resistance 30 0 true
title @s title {"text":"Welcome","color":"gold"}
tellraw @s {"text":"Kit received. Have fun!"}Each line is one command. The give lines hand out items, effect give adds a 30 second resistance effect, title shows a big heading, and tellraw sends a chat message to the player who ran the function.
A server owner wants an invisible armor stand at the spawn point, without a repeating command that keeps giving it invisibility. PHPloom writes one summon line into a function file, with the data tag Invisible:1b set inside the entity data, so the stand is invisible from the start. It reads the pack back with read_file and uses grep to confirm that only 1 summon line exists. You review the diff, type /reload and run the function once in your own world to check the result.
To count mobs, PHPloom writes a function with an execute store result score line that ends in if entity and a selector for one mob type, for example zombies. The count lands in a score holder named Zombies, which you can show on the sidebar with the scoreboard objectives setdisplay command. The agent uses write_file for the function and read_file to check it. Ask first lets you read both lines before they exist. In your own world, spawn 3 zombies, run the function and compare the sidebar number with what you see.