Skip to Content
MineDuels

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.

RuleQuestion it answers
buildMay players place blocks at all?
build-marginHow far outside the arena box may they place?
break-arenaWhich blocks that were already in the arena may they break?
interact-arenaWhich 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:

  1. The match is in the fight (not the countdown, not after the round) and the player is still in the round.
  2. The kit has build: true.
  3. 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 is all).

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 is all), or
  • the kit has skywars-loot and the block is a loot container, or
  • build is on and the block is breakable by break-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 wantWrite
White woolwhite_wool
A coloured glass panewhite_stained_glass_pane (each colour is its own block, list each one)
Oak planksoak_planks
Obsidianobsidian
Every blockall

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_door

A short form with commas works too:

rules:
  break-arena: white_wool,oak_planks

Set 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 all

all in the kit position changes every kit.

The block picker

Run the command without a value as a player:

/md kit rule bedwars break-arena

A menu opens that lists the current blocks.

ActionResult
Click a block in your own inventoryThe block is added
Put an item from your cursor on the menuThe block of that item is added
Right click a block in the menuThe 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: false

With build: false the other three rules do nothing for breaking and placing.

Players only break their own blocks

rules:
  build: true
  build-margin: 2

Players 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_stone

Players 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:
    - all

Every 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_button

Players 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_sandstone

Explosions 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
    - dirt

Loot 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_pickaxe

Only 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

ProblemCause and fix
A block of the map will not breakIts name is not in break-arena, or build is false. Run /md kit info <kit>
A block breaks that you did not listA player placed it earlier in the match. Placed blocks always break
Players cannot place near the edgeRaise build-margin, or enlarge the arena selection
A door does not openAdd it to interact-arena
A change has no effectRun /md reload and start a new match
A name is rejectedUse only a-z, 0-9 and _, up to 64 characters

Related: Kit rules, Example kits, Creating kits and arenas.

On this page