Breakable blocks
How build, build-margin, break-arena, interact-arena and allow-crafting decide what players can change, with examples.
Four kit rules control how players change an arena. They work together, so read the whole page once.
| Rule | Question it answers |
|---|---|
build | May players place blocks at all? |
build-margin | How far outside the arena box may they place? |
break-arena | Which blocks that were already in the arena may they break? |
interact-arena | Which arena blocks may they use without breaking them? |
How it works
Every match runs on its own copy of the arena. The part of the world that came from your template is the arena blocks. Blocks that players place during the match are placed blocks.
When a player breaks a block, MineDuels checks these conditions in order:
- The match is in the fight (not the countdown, not after the round) and the player is still in the round.
- The kit has
build: true. - The block is allowed, which means one of:
- a placed block. The player or another fighter placed it during this match. Placed blocks can always be broken.
- an arena block listed in
break-arena. It is part of the template box and its name is in the list (or the list isall).
If any check fails, the break is cancelled and the block stays.
When a player places a block, MineDuels checks that the match is in the fight, build is on, and the position is inside the arena box grown by build-margin blocks. A bucket of water or lava counts as a placed block when poured into air.
When a player uses a block (opens a door, presses a button, opens a chest), it is allowed when:
- it is a placed block, or
- its name is in
interact-arena(or the list isall), or - the kit has
skywars-lootand the block is a loot container, or buildis on and the block is breakable bybreak-arena.
A block the player may break can always be used too. When a player may not use a block, an action bar message shows the match.block-locked line of messages.yml.
Explosions use the same rule. Only placed blocks, and arena blocks in break-arena when build is on, are destroyed. Beds are never blown up. Fire only burns placed blocks, and fire does not spread.
At the end of the round or match the arena copy is reset, so nothing a player breaks or places stays for the next match.
Block names
Lists use the Minecraft block id without minecraft:, in lower case with underscores. You can write minecraft:white_wool and it is stored as white_wool.
| You want | Write |
|---|---|
| White wool | white_wool |
| A coloured glass pane | white_stained_glass_pane (each colour is its own block, list each one) |
| Oak planks | oak_planks |
| Obsidian | obsidian |
| Every block | all |
A name that is not a valid block name is rejected by the command and ignored in a file. A name that is valid but has no block of that name never matches, so a typo fails silently. Check the id in the game with F3 and look at the block, or with /give @s <name>.
The value all stands for every block and replaces the rest of the list. Use none in a command to empty a list.
Set it in the kit file
rules:
build: true
break-arena:
- white_wool
- oak_planks
interact-arena:
- chest
- oak_doorA short form with commas works too:
rules:
break-arena: white_wool,oak_planksSet it with commands
/md kit rule bedwars break-arena white_wool,end_stone,oak_planks
/md kit rule bedwars interact-arena chest,ender_chest
/md kit rule bedwars break-arena none
/md kit rule all break-arena allall in the kit position changes every kit.
The block picker
Run the command without a value as a player:
/md kit rule bedwars break-arenaA menu opens that lists the current blocks.
| Action | Result |
|---|---|
| Click a block in your own inventory | The block is added |
| Put an item from your cursor on the menu | The block of that item is added |
| Right click a block in the menu | The block is removed |
Each change is saved to the kit file at once. The look of this menu is guis/kit-rule-blocks.yml.
Examples
Parkour or sumo: nothing breaks
rules:
build: falseWith build: false the other three rules do nothing for breaking and placing.
Players only break their own blocks
rules:
build: true
build-margin: 2Players can place blocks up to 2 blocks outside the arena box and break only what they placed. The map itself is safe. This is the default behaviour for bridge.
Bedwars: wool and planks of the map can be broken
rules:
beds: true
build: true
build-margin: 4
break-arena:
- white_wool
- oak_planks
- end_stonePlayers break the wool, planks and end stone that your template contains, plus everything they place. Obsidian and other protected blocks stay. Beds are handled by beds: true, so they do not need to be listed.
Destructible map
rules:
build: true
break-arena:
- allEvery block of the template box can be broken. Use it for small chaotic maps.
Doors and chests that work, walls that do not
rules:
build: true
interact-arena:
- oak_door
- oak_trapdoor
- chest
- lever
- stone_buttonPlayers open doors and chests and press buttons of the map, but cannot break them.
TNT map: explosions break only some blocks
rules:
build: true
tnt-sumo: true
auto-tnt: true
break-arena:
- sandstone
- cut_sandstoneExplosions follow the same list. Only the listed template blocks (and placed blocks) are blown up.
Skywars: chests open, the island stays
rules:
build: true
skywars-loot: true
loot-table: skywars
break-arena:
- grass_block
- dirtLoot chests can be opened without listing them in interact-arena.
Crafting
allow-crafting works the same way for items. By default players can craft everything.
rules:
allow-crafting:
- oak_planks
- stick
- wooden_pickaxeOnly the listed items can be crafted, in the inventory grid and at crafting tables. A blocked craft shows the match.craft-locked message. Use [all] to allow every item and [] to allow none.
Troubleshooting
| Problem | Cause and fix |
|---|---|
| A block of the map will not break | Its name is not in break-arena, or build is false. Run /md kit info <kit> |
| A block breaks that you did not list | A player placed it earlier in the match. Placed blocks always break |
| Players cannot place near the edge | Raise build-margin, or enlarge the arena selection |
| A door does not open | Add it to interact-arena |
| A change has no effect | Run /md reload and start a new match |
| A name is rejected | Use only a-z, 0-9 and _, up to 64 characters |
Related: Kit rules, Example kits, Creating kits and arenas.