Command blocks and datapacks

Getting Started Reviewed September 6, 2026 2 min read

Command blocks and datapacks are vanilla Minecraft's own extension points. They work on any server type, they survive version changes better than plugins, and neither of them needs anything installed on the client.

Turning command blocks on

They are disabled by default. Set enable-command-block=true in server.properties and restart. After that, /give @s command_block gets you one — they cannot be crafted, only given, and only to operators.

The three types

TypeRuns
Impulse (orange)Once, when powered.
Chain (green)When the block pointing into it runs.
Repeat (purple)Every tick — twenty times a second.
A repeating command block runs twenty times a second, forever

That is fine for one testing a condition. A handful of them running expensive selectors like @e[distance=..100] across a loaded world is a genuine and very hard-to-find source of lag, because nothing in the logs mentions them. If TPS dropped and nobody installed anything, look for command blocks.

Installing a datapack

  1. Drop the zip in the world's datapacks folder

    It goes inside the world folder itself, not next to it. That is why datapacks travel with a world when you move it.

  2. Run /reload or restart

    Datapacks are one of the few things /reload genuinely handles well, because they are data rather than running code.

  3. Check it loaded

    /datapack list shows enabled and disabled packs. A pack listed as disabled usually has a pack.mcmeta written for a different game version.

Datapacks are the portable choice

They live inside the world, need no server software in particular, and cannot crash the server the way a plugin can. If a thing can be done with a datapack, that is usually the lower-maintenance way to do it.