BedWars in Minecraft datapack

Datapacks

Bed, resources and villager-shopLearn more

Datap BedWars for Minecraft 1.21.11 – 26.3: The islands of commands with a bed, generators of iron, gold and emeralds, and the resident shopkeeper in the window of commerce. While the bed is still alive, the next death has been broken.

My game select version

We'll remember in this browser and set up where your version is available. Open link settings are more important than this choice; the Vicki versions do not change.

Commands

  • Red
  • Blue
  • Green
  • Yellow

Players are assigned to commands in turns: two commands of eight players have four each.

Generators

  • Iron Ingot 1 s, up to 48
  • Gold Ingot 8 s, up to 16
  • Emerald 30 s, up to 4

Iron and gold are on the island of each command, emeralds are in the center. More than this is not accumulated in the heap.

Map above

Date · 1.21.11 - 26.3

The bed is command-colored wool, the generator is an Block of Iron, the store is boards, emeralds are in the center.

Commands
4
Store deals
12

Start round - any player in the lobby

/trigger start
Download datapack
What's inside the archive - 50 files

data/minecraft/tags/function/load.json

Load tag: the game calls these functions when loading the world and after /reload.

{
  "values": [
    "bedwars:load"
  ]
}

data/minecraft/tags/function/tick.json

Tick tag: these functions run every tick - 20 times per second.

{
  "values": [
    "bedwars:tick"
  ]
}

data/minecraft/dimension/overworld.json

Normal world without land: the game only reads this file when creating a world.

{
  "type": "minecraft:overworld",
  "generator": {
    "type": "minecraft:flat",
    "settings": {
      "biome": "minecraft:the_void",
      "features": false,
      "lakes": false,
      "layers": [
        {
          "block": "minecraft:air",
          "height": 1
        }
      ],
      "structure_overrides": []
    }
  }
}

data/bedwars/function/build.mcfunction

Load the arena chunks and, when everyone is ready, build.

forceload add -55 -55 55 55
execute unless loaded -56 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded -56 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded -56 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded -56 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded -56 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded -56 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded -56 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded -56 ~ 56 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded -40 ~ 56 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded -24 ~ 56 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded -8 ~ 56 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded 8 ~ 56 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded 24 ~ 56 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded 40 ~ 56 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ -56 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ -40 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ -24 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ -8 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ 8 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ 24 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ 40 run return run schedule function bedwars:build 5t
execute unless loaded 56 ~ 56 run return run schedule function bedwars:build 5t
function bedwars:make

data/bedwars/function/make.mcfunction

Arena reimagined: cleaning, islands, beds, generators, shops.

kill @e[type=!player,x=-55,y=80,z=-55,dx=110,dy=45,dz=110]
fill -55 80 -55 55 81 55 minecraft:air
fill -55 82 -55 55 83 55 minecraft:air
fill -55 84 -55 55 85 55 minecraft:air
fill -55 86 -55 55 87 55 minecraft:air
fill -55 88 -55 55 89 55 minecraft:air
fill -55 90 -55 55 91 55 minecraft:air
fill -55 92 -55 55 93 55 minecraft:air
fill -55 94 -55 55 95 55 minecraft:air
fill -55 96 -55 55 97 55 minecraft:air
fill -55 98 -55 55 99 55 minecraft:air
fill -55 100 -55 55 101 55 minecraft:air
fill -55 102 -55 55 103 55 minecraft:air
fill -55 104 -55 55 105 55 minecraft:air
fill -55 106 -55 55 107 55 minecraft:air
fill -55 108 -55 55 109 55 minecraft:air
fill -55 110 -55 55 111 55 minecraft:air
fill -55 112 -55 55 113 55 minecraft:air
fill -55 114 -55 55 115 55 minecraft:air
fill -55 116 -55 55 117 55 minecraft:air
fill -55 118 -55 55 119 55 minecraft:air
fill -55 120 -55 55 121 55 minecraft:air
fill -55 122 -55 55 123 55 minecraft:air
fill -55 124 -55 55 125 55 minecraft:air
fill -4 139 -4 4 143 4 minecraft:glass hollow
place template bedwars:center -7 92 -7
setblock 0 100 0 minecraft:emerald_block
summon marker 0.5 101 0.5 {Tags:["bedwars_emerald"]}
place template bedwars:base -5 94 -39
setblock 0 101 -36 minecraft:red_bed[part=foot,facing=north]
setblock 0 101 -37 minecraft:red_bed[part=head,facing=north]
setblock 3 100 -34 minecraft:iron_block
summon marker 3.5 101 -33.5 {Tags:["bedwars_iron","bedwars_gold"]}
summon minecraft:villager -2.5 101 -33.5 {CustomName:"Магазин",Invulnerable:1b,NoAI:1b,Silent:1b,VillagerData:{profession:"minecraft:armorer",level:5,type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:iron_ingot",count:4},sell:{id:"minecraft:red_wool",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:24},sell:{id:"minecraft:end_stone",count:12},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:4},sell:{id:"minecraft:oak_planks",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:10},sell:{id:"minecraft:stone_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:7},sell:{id:"minecraft:iron_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:diamond_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:iron_chestplate",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:6},sell:{id:"minecraft:iron_pickaxe",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:bow",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:2},sell:{id:"minecraft:arrow",count:8},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:3},sell:{id:"minecraft:golden_apple",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:ender_pearl",count:1},maxUses:2147483647,rewardExp:0b}]},Tags:["bedwars"],Rotation:[-90f,0f]}
place template bedwars:base -5 94 29
setblock 0 101 36 minecraft:blue_bed[part=foot,facing=south]
setblock 0 101 37 minecraft:blue_bed[part=head,facing=south]
setblock -3 100 34 minecraft:iron_block
summon marker -2.5 101 34.5 {Tags:["bedwars_iron","bedwars_gold"]}
summon minecraft:villager 3.5 101 34.5 {CustomName:"Магазин",Invulnerable:1b,NoAI:1b,Silent:1b,VillagerData:{profession:"minecraft:armorer",level:5,type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:iron_ingot",count:4},sell:{id:"minecraft:blue_wool",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:24},sell:{id:"minecraft:end_stone",count:12},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:4},sell:{id:"minecraft:oak_planks",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:10},sell:{id:"minecraft:stone_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:7},sell:{id:"minecraft:iron_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:diamond_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:iron_chestplate",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:6},sell:{id:"minecraft:iron_pickaxe",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:bow",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:2},sell:{id:"minecraft:arrow",count:8},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:3},sell:{id:"minecraft:golden_apple",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:ender_pearl",count:1},maxUses:2147483647,rewardExp:0b}]},Tags:["bedwars"],Rotation:[90f,0f]}
place template bedwars:base 29 94 -5
setblock 36 101 0 minecraft:lime_bed[part=foot,facing=east]
setblock 37 101 0 minecraft:lime_bed[part=head,facing=east]
setblock 34 100 3 minecraft:iron_block
summon marker 34.5 101 3.5 {Tags:["bedwars_iron","bedwars_gold"]}
summon minecraft:villager 34.5 101 -2.5 {CustomName:"Магазин",Invulnerable:1b,NoAI:1b,Silent:1b,VillagerData:{profession:"minecraft:armorer",level:5,type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:iron_ingot",count:4},sell:{id:"minecraft:lime_wool",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:24},sell:{id:"minecraft:end_stone",count:12},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:4},sell:{id:"minecraft:oak_planks",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:10},sell:{id:"minecraft:stone_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:7},sell:{id:"minecraft:iron_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:diamond_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:iron_chestplate",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:6},sell:{id:"minecraft:iron_pickaxe",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:bow",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:2},sell:{id:"minecraft:arrow",count:8},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:3},sell:{id:"minecraft:golden_apple",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:ender_pearl",count:1},maxUses:2147483647,rewardExp:0b}]},Tags:["bedwars"],Rotation:[0f,0f]}
place template bedwars:base -39 94 -5
setblock -36 101 0 minecraft:yellow_bed[part=foot,facing=west]
setblock -37 101 0 minecraft:yellow_bed[part=head,facing=west]
setblock -34 100 -3 minecraft:iron_block
summon marker -33.5 101 -2.5 {Tags:["bedwars_iron","bedwars_gold"]}
summon minecraft:villager -33.5 101 3.5 {CustomName:"Магазин",Invulnerable:1b,NoAI:1b,Silent:1b,VillagerData:{profession:"minecraft:armorer",level:5,type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:iron_ingot",count:4},sell:{id:"minecraft:yellow_wool",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:24},sell:{id:"minecraft:end_stone",count:12},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:4},sell:{id:"minecraft:oak_planks",count:16},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:iron_ingot",count:10},sell:{id:"minecraft:stone_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:7},sell:{id:"minecraft:iron_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:diamond_sword",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:iron_chestplate",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:6},sell:{id:"minecraft:iron_pickaxe",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:12},sell:{id:"minecraft:bow",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:2},sell:{id:"minecraft:arrow",count:8},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:gold_ingot",count:3},sell:{id:"minecraft:golden_apple",count:1},maxUses:2147483647,rewardExp:0b},{buy:{id:"minecraft:emerald",count:4},sell:{id:"minecraft:ender_pearl",count:1},maxUses:2147483647,rewardExp:0b}]},Tags:["bedwars"],Rotation:[180f,0f]}
setworldspawn 0 140 0
schedule function bedwars:release 5s

data/bedwars/function/release.mcfunction

5 seconds after the chunk is built, arenas are released.

forceload remove -55 -55 55 55

data/bedwars/function/team/red.mcfunction

To the Red command, to her island, to her rebirth, to the same place.

team join bedwars_red @s
tag @s remove bedwars_queue
tag @s add bedwars_alive
tp @s 0.5 101 -33.5 facing 0.5 101 0.5
spawnpoint @s 0 101 -34

data/bedwars/function/kit/red.mcfunction

Red command set: leather armor of its colour and Wooden Sword.

item replace entity @s armor.head with minecraft:leather_helmet[minecraft:dyed_color=11546150,minecraft:unbreakable={}]
item replace entity @s armor.chest with minecraft:leather_chestplate[minecraft:dyed_color=11546150,minecraft:unbreakable={}]
item replace entity @s armor.legs with minecraft:leather_leggings[minecraft:dyed_color=11546150,minecraft:unbreakable={}]
item replace entity @s armor.feet with minecraft:leather_boots[minecraft:dyed_color=11546150,minecraft:unbreakable={}]
give @s minecraft:wooden_sword[minecraft:unbreakable={}]

data/bedwars/function/bed/keep_red.mcfunction

The Red player broke his bed, and she's back.

scoreboard players reset @s bedwars_red
setblock 0 101 -36 minecraft:red_bed[part=foot,facing=north]
setblock 0 101 -37 minecraft:red_bed[part=head,facing=north]
execute positioned 0 101 -36 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:red_bed"}}]
tellraw @s {"text":"Свою кровать ломать нельзя.","color":"red"}

data/bedwars/function/bed/lost_red.mcfunction

The Red bed is broken: no more rebirths.

scoreboard players set #bed_red bedwars 0
execute positioned 0 101 -36 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:red_bed"}}]
tellraw @a {"text":"Кровать красных разрушена!","color":"red"}
title @a[team=bedwars_red] title {"text":"Кровать разрушена!","color":"red"}
title @a[team=bedwars_red] subtitle {"text":"следующая смерть — последняя"}
execute as @a at @s run playsound minecraft:entity.ender_dragon.growl master @s

data/bedwars/function/bed/none_red.mcfunction

No one in the Reds is cleaning up the bed.

scoreboard players set #bed_red bedwars 0
fill 0 101 -36 0 101 -37 minecraft:air

data/bedwars/function/team/blue.mcfunction

The Blue command, on her island, the rebirth there.

team join bedwars_blue @s
tag @s remove bedwars_queue
tag @s add bedwars_alive
tp @s 0.5 101 34.5 facing 0.5 101 0.5
spawnpoint @s 0 101 34

data/bedwars/function/kit/blue.mcfunction

Blue command set: leather armor of its colour and Wooden Sword.

item replace entity @s armor.head with minecraft:leather_helmet[minecraft:dyed_color=3949738,minecraft:unbreakable={}]
item replace entity @s armor.chest with minecraft:leather_chestplate[minecraft:dyed_color=3949738,minecraft:unbreakable={}]
item replace entity @s armor.legs with minecraft:leather_leggings[minecraft:dyed_color=3949738,minecraft:unbreakable={}]
item replace entity @s armor.feet with minecraft:leather_boots[minecraft:dyed_color=3949738,minecraft:unbreakable={}]
give @s minecraft:wooden_sword[minecraft:unbreakable={}]

data/bedwars/function/bed/keep_blue.mcfunction

The Blue player broke his bed, and she's back.

scoreboard players reset @s bedwars_blue
setblock 0 101 36 minecraft:blue_bed[part=foot,facing=south]
setblock 0 101 37 minecraft:blue_bed[part=head,facing=south]
execute positioned 0 101 36 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:blue_bed"}}]
tellraw @s {"text":"Свою кровать ломать нельзя.","color":"red"}

data/bedwars/function/bed/lost_blue.mcfunction

The Blue bed is broken: they are no longer reborn.

scoreboard players set #bed_blue bedwars 0
execute positioned 0 101 36 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:blue_bed"}}]
tellraw @a {"text":"Кровать синих разрушена!","color":"blue"}
title @a[team=bedwars_blue] title {"text":"Кровать разрушена!","color":"red"}
title @a[team=bedwars_blue] subtitle {"text":"следующая смерть — последняя"}
execute as @a at @s run playsound minecraft:entity.ender_dragon.growl master @s

data/bedwars/function/bed/none_blue.mcfunction

There's no one at Blue, the bed is cleaned.

scoreboard players set #bed_blue bedwars 0
fill 0 101 36 0 101 37 minecraft:air

data/bedwars/function/team/green.mcfunction

The Green command, to her island, the rebirth command, there.

team join bedwars_green @s
tag @s remove bedwars_queue
tag @s add bedwars_alive
tp @s 34.5 101 0.5 facing 0.5 101 0.5
spawnpoint @s 34 101 0

data/bedwars/function/kit/green.mcfunction

Green command set: leather armor of its colour and Wooden Sword.

item replace entity @s armor.head with minecraft:leather_helmet[minecraft:dyed_color=8439583,minecraft:unbreakable={}]
item replace entity @s armor.chest with minecraft:leather_chestplate[minecraft:dyed_color=8439583,minecraft:unbreakable={}]
item replace entity @s armor.legs with minecraft:leather_leggings[minecraft:dyed_color=8439583,minecraft:unbreakable={}]
item replace entity @s armor.feet with minecraft:leather_boots[minecraft:dyed_color=8439583,minecraft:unbreakable={}]
give @s minecraft:wooden_sword[minecraft:unbreakable={}]

data/bedwars/function/bed/keep_green.mcfunction

The Green player broke his bed, and she's back.

scoreboard players reset @s bedwars_green
setblock 36 101 0 minecraft:lime_bed[part=foot,facing=east]
setblock 37 101 0 minecraft:lime_bed[part=head,facing=east]
execute positioned 36 101 0 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:lime_bed"}}]
tellraw @s {"text":"Свою кровать ломать нельзя.","color":"red"}

data/bedwars/function/bed/lost_green.mcfunction

The green bed is broken: no longer reborn.

scoreboard players set #bed_green bedwars 0
execute positioned 36 101 0 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:lime_bed"}}]
tellraw @a {"text":"Кровать зелёных разрушена!","color":"green"}
title @a[team=bedwars_green] title {"text":"Кровать разрушена!","color":"red"}
title @a[team=bedwars_green] subtitle {"text":"следующая смерть — последняя"}
execute as @a at @s run playsound minecraft:entity.ender_dragon.growl master @s

data/bedwars/function/bed/none_green.mcfunction

The Greens are no one, and the bed is cleaned.

scoreboard players set #bed_green bedwars 0
fill 36 101 0 37 101 0 minecraft:air

data/bedwars/function/team/yellow.mcfunction

The yellow command, to her island, the rebirth, the same.

team join bedwars_yellow @s
tag @s remove bedwars_queue
tag @s add bedwars_alive
tp @s -33.5 101 0.5 facing 0.5 101 0.5
spawnpoint @s -34 101 0

data/bedwars/function/kit/yellow.mcfunction

Yellow command set: leather armor of its colour and a Wooden Sword.

item replace entity @s armor.head with minecraft:leather_helmet[minecraft:dyed_color=16701501,minecraft:unbreakable={}]
item replace entity @s armor.chest with minecraft:leather_chestplate[minecraft:dyed_color=16701501,minecraft:unbreakable={}]
item replace entity @s armor.legs with minecraft:leather_leggings[minecraft:dyed_color=16701501,minecraft:unbreakable={}]
item replace entity @s armor.feet with minecraft:leather_boots[minecraft:dyed_color=16701501,minecraft:unbreakable={}]
give @s minecraft:wooden_sword[minecraft:unbreakable={}]

data/bedwars/function/bed/keep_yellow.mcfunction

The yellow player broke his bed, and she's back.

scoreboard players reset @s bedwars_yellow
setblock -36 101 0 minecraft:yellow_bed[part=foot,facing=west]
setblock -37 101 0 minecraft:yellow_bed[part=head,facing=west]
execute positioned -36 101 0 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:yellow_bed"}}]
tellraw @s {"text":"Свою кровать ломать нельзя.","color":"red"}

data/bedwars/function/bed/lost_yellow.mcfunction

The yellow bed is broken: no longer reborn.

scoreboard players set #bed_yellow bedwars 0
execute positioned -36 101 0 run kill @e[type=item,distance=..4,nbt={Item:{id:"minecraft:yellow_bed"}}]
tellraw @a {"text":"Кровать жёлтых разрушена!","color":"yellow"}
title @a[team=bedwars_yellow] title {"text":"Кровать разрушена!","color":"red"}
title @a[team=bedwars_yellow] subtitle {"text":"следующая смерть — последняя"}
execute as @a at @s run playsound minecraft:entity.ender_dragon.growl master @s

data/bedwars/function/bed/none_yellow.mcfunction

There's no one in Yellow, the bed is cleaned.

scoreboard players set #bed_yellow bedwars 0
fill -36 101 0 -37 101 0 minecraft:air

data/bedwars/function/assign.mcfunction

Players on commands take turns: a random one from the queue goes to the next one.

execute unless entity @a[tag=bedwars_queue] run return 0
execute if score #next bedwars matches 0 as @r[tag=bedwars_queue] run function bedwars:team/red
execute if score #next bedwars matches 1 as @r[tag=bedwars_queue] run function bedwars:team/blue
execute if score #next bedwars matches 2 as @r[tag=bedwars_queue] run function bedwars:team/green
execute if score #next bedwars matches 3 as @r[tag=bedwars_queue] run function bedwars:team/yellow
scoreboard players add #next bedwars 1
execute if score #next bedwars matches 4.. run scoreboard players set #next bedwars 0
function bedwars:assign

data/bedwars/function/respawn.mcfunction

Died with the whole bed: after revival - set.

tag @s add bedwars_back
tellraw @a ["",{"selector":"@s"},{"text":" погиб — кровать цела, вернётся.","color":"gray"}]

data/bedwars/function/back.mcfunction

Reborn: recruiting your command.

tag @s remove bedwars_back
execute if entity @s[team=bedwars_red] run function bedwars:kit/red
execute if entity @s[team=bedwars_blue] run function bedwars:kit/blue
execute if entity @s[team=bedwars_green] run function bedwars:kit/green
execute if entity @s[team=bedwars_yellow] run function bedwars:kit/yellow

data/bedwars/function/drop/iron.mcfunction

Generator: a click if there's less than 48 in the pile.

scoreboard players set #pile bedwars 0
execute store result score #pile bedwars run data get entity @n[type=item,distance=..1.5,nbt={Item:{id:"minecraft:iron_ingot"}}] Item.count
execute if score #pile bedwars matches ..47 run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:iron_ingot",count:1}}

data/bedwars/function/gen/iron.mcfunction

Once every 20 tikis is iron_ingot on each generator.

execute as @e[type=marker,tag=bedwars_iron] at @s run function bedwars:drop/iron
execute if score #state bedwars matches 1 run schedule function bedwars:gen/iron 20t

data/bedwars/function/drop/gold.mcfunction

Generator: a click if there's less than 16 in the pile.

scoreboard players set #pile bedwars 0
execute store result score #pile bedwars run data get entity @n[type=item,distance=..1.5,nbt={Item:{id:"minecraft:gold_ingot"}}] Item.count
execute if score #pile bedwars matches ..15 run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:gold_ingot",count:1}}

data/bedwars/function/gen/gold.mcfunction

Once every 160 tikis are gold_ingot on each generator.

execute as @e[type=marker,tag=bedwars_gold] at @s run function bedwars:drop/gold
execute if score #state bedwars matches 1 run schedule function bedwars:gen/gold 160t

data/bedwars/function/drop/emerald.mcfunction

Generator: a click if there's less than 4.

scoreboard players set #pile bedwars 0
execute store result score #pile bedwars run data get entity @n[type=item,distance=..1.5,nbt={Item:{id:"minecraft:emerald"}}] Item.count
execute if score #pile bedwars matches ..3 run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:emerald",count:1}}

data/bedwars/function/gen/emerald.mcfunction

Once every 600 tikis, it's Emerald on each generator.

execute as @e[type=marker,tag=bedwars_emerald] at @s run function bedwars:drop/emerald
execute if score #state bedwars matches 1 run schedule function bedwars:gen/emerald 600t

data/bedwars/function/load.mcfunction

When loading the world: accounts, start trigger and arena, if it does not exist yet.

scoreboard objectives add bedwars dummy
scoreboard objectives add start trigger "Начать раунд"
scoreboard objectives add bedwars_deaths deathCount
scoreboard objectives add bedwars_left minecraft.custom:minecraft.leave_game
team add bedwars_red
team modify bedwars_red color red
team modify bedwars_red friendlyFire false
scoreboard objectives add bedwars_red minecraft.mined:minecraft.red_bed
team add bedwars_blue
team modify bedwars_blue color blue
team modify bedwars_blue friendlyFire false
scoreboard objectives add bedwars_blue minecraft.mined:minecraft.blue_bed
team add bedwars_green
team modify bedwars_green color green
team modify bedwars_green friendlyFire false
scoreboard objectives add bedwars_green minecraft.mined:minecraft.lime_bed
team add bedwars_yellow
team modify bedwars_yellow color yellow
team modify bedwars_yellow friendlyFire false
scoreboard objectives add bedwars_yellow minecraft.mined:minecraft.yellow_bed
execute unless score #built bedwars matches 1 run schedule function bedwars:setup 1t
tellraw @a ["",{"text":"BedWars загружен. Начать раунд — "},{"text":"/trigger start","color":"gold","click_event":{"action":"run_command","command":"/trigger start"}},{"text":"."}]

data/bedwars/function/setup.mcfunction

First load: build an arena.

function bedwars:build
scoreboard players set #built bedwars 1

data/bedwars/function/tick.mcfunction

Every tick: start, newcomers and returnees, game progress.

scoreboard players enable @a start
execute as @a[scores={start=1..}] run function bedwars:start
execute as @a[tag=!bedwars_seen] run function bedwars:join
execute as @a[scores={bedwars_left=1..}] run function bedwars:join
execute if score #state bedwars matches 1 run function bedwars:play

data/bedwars/function/join.mcfunction

The player entered: the round is going on - he looks, no - in the lobby. Anyone who leaves the game will not return to it.

scoreboard players reset @s bedwars_left
tag @s add bedwars_seen
tag @s remove bedwars_alive
execute if score #state bedwars matches 1.. run return run function bedwars:watch
function bedwars:lobby

data/bedwars/function/watch.mcfunction

Latecomers and dropouts watch as observers.

gamemode spectator @s
tp @s 0 120 0
tellraw @s {"text":"Идёт раунд — вы смотрите. Следующий начнётся сам.","color":"gray"}

data/bedwars/function/lobby.mcfunction

Player in lobby: adventure mode, empty inventory, full health.

gamemode adventure @s
team leave @s
clear @s
effect clear @s
effect give @s minecraft:instant_health 1 20 true
effect give @s minecraft:saturation 1 20 true
xp set @s 0 levels
xp set @s 0 points
execute as @s run attribute @s minecraft:movement_speed base reset
execute as @s run attribute @s minecraft:jump_strength base reset
tp @s 0 140 0
spawnpoint @s 0 140 0

data/bedwars/function/start.mcfunction

/trigger start - places, countdown. No operator rights required.

scoreboard players set @s start 0
execute if score #state bedwars matches 1.. run return run tellraw @s {"text":"Раунд уже идёт."}
execute store result score #players bedwars if entity @a
execute if score #players bedwars matches ..1 run return run tellraw @s {"text":"Нужно хотя бы 2 игрока.","color":"red"}
scoreboard players set #state bedwars 2
tag @a add bedwars_queue
scoreboard players set #next bedwars 0
function bedwars:assign
execute as @a[tag=bedwars_alive] run attribute @s minecraft:movement_speed base set 0
execute as @a[tag=bedwars_alive] run attribute @s minecraft:jump_strength base set 0
execute as @a[tag=bedwars_queue] run function bedwars:watch
tag @a remove bedwars_queue
execute as @a[tag=bedwars_alive] run function bedwars:prep
scoreboard players set #count bedwars 10
function bedwars:count

data/bedwars/function/prep.mcfunction

Player in place: empty inventory, full health and well-fed.

gamemode adventure @s
clear @s
effect clear @s
effect give @s minecraft:instant_health 1 20 true
effect give @s minecraft:saturation 1 20 true
xp set @s 0 levels
xp set @s 0 points
scoreboard players reset @s bedwars_deaths

data/bedwars/function/count.mcfunction

Countdown 10... 1 titre, zero start.

execute if score #count bedwars matches ..0 run return run function bedwars:go
title @a times 0 25 5
title @a title {"score":{"name":"#count","objective":"bedwars"},"color":"gold"}
execute as @a at @s run playsound minecraft:block.note_block.hat master @s
scoreboard players remove #count bedwars 1
schedule function bedwars:count 1s

data/bedwars/function/go.mcfunction

Start of the round.

scoreboard players set #state bedwars 1
gamemode survival @a[tag=bedwars_alive]
title @a title {"text":"Старт!","color":"green"}
execute as @a at @s run playsound minecraft:entity.player.levelup master @s
forceload add -55 -55 55 55
execute as @a[tag=bedwars_alive] run attribute @s minecraft:movement_speed base reset
execute as @a[tag=bedwars_alive] run attribute @s minecraft:jump_strength base reset
scoreboard players set #bed_red bedwars 1
execute unless entity @a[tag=bedwars_alive,team=bedwars_red] run function bedwars:bed/none_red
scoreboard players reset * bedwars_red
execute as @a[tag=bedwars_alive,team=bedwars_red] run function bedwars:kit/red
scoreboard players set #bed_blue bedwars 1
execute unless entity @a[tag=bedwars_alive,team=bedwars_blue] run function bedwars:bed/none_blue
scoreboard players reset * bedwars_blue
execute as @a[tag=bedwars_alive,team=bedwars_blue] run function bedwars:kit/blue
scoreboard players set #bed_green bedwars 1
execute unless entity @a[tag=bedwars_alive,team=bedwars_green] run function bedwars:bed/none_green
scoreboard players reset * bedwars_green
execute as @a[tag=bedwars_alive,team=bedwars_green] run function bedwars:kit/green
scoreboard players set #bed_yellow bedwars 1
execute unless entity @a[tag=bedwars_alive,team=bedwars_yellow] run function bedwars:bed/none_yellow
scoreboard players reset * bedwars_yellow
execute as @a[tag=bedwars_alive,team=bedwars_yellow] run function bedwars:kit/yellow
function bedwars:gen/iron
function bedwars:gen/gold
function bedwars:gen/emerald
title @a subtitle {"text":"Защищайте свою кровать"}

data/bedwars/function/play.mcfunction

Every tick of the round: deaths, falls and who is left.

execute as @a[tag=bedwars_alive,y=-2048,dy=2118] run kill @s
execute as @a[tag=bedwars_alive,scores={bedwars_deaths=1..}] run function bedwars:died
execute if score #bed_red bedwars matches 1 as @a[team=bedwars_red,scores={bedwars_red=1..}] run function bedwars:bed/keep_red
execute if score #bed_red bedwars matches 1 unless block 0 101 -36 minecraft:red_bed run function bedwars:bed/lost_red
execute if score #bed_blue bedwars matches 1 as @a[team=bedwars_blue,scores={bedwars_blue=1..}] run function bedwars:bed/keep_blue
execute if score #bed_blue bedwars matches 1 unless block 0 101 36 minecraft:blue_bed run function bedwars:bed/lost_blue
execute if score #bed_green bedwars matches 1 as @a[team=bedwars_green,scores={bedwars_green=1..}] run function bedwars:bed/keep_green
execute if score #bed_green bedwars matches 1 unless block 36 101 0 minecraft:lime_bed run function bedwars:bed/lost_green
execute if score #bed_yellow bedwars matches 1 as @a[team=bedwars_yellow,scores={bedwars_yellow=1..}] run function bedwars:bed/keep_yellow
execute if score #bed_yellow bedwars matches 1 unless block -36 101 0 minecraft:yellow_bed run function bedwars:bed/lost_yellow
execute as @e[type=player,tag=bedwars_back] run function bedwars:back
scoreboard players set #teams bedwars 0
execute if entity @a[tag=bedwars_alive,team=bedwars_red] run scoreboard players add #teams bedwars 1
execute if entity @a[tag=bedwars_alive,team=bedwars_blue] run scoreboard players add #teams bedwars 1
execute if entity @a[tag=bedwars_alive,team=bedwars_green] run scoreboard players add #teams bedwars 1
execute if entity @a[tag=bedwars_alive,team=bedwars_yellow] run scoreboard players add #teams bedwars 1
execute if score #teams bedwars matches ..1 run function bedwars:win

data/bedwars/function/died.mcfunction

The player died.

scoreboard players reset @s bedwars_deaths
execute if entity @s[team=bedwars_red] if score #bed_red bedwars matches 1 run return run function bedwars:respawn
execute if entity @s[team=bedwars_blue] if score #bed_blue bedwars matches 1 run return run function bedwars:respawn
execute if entity @s[team=bedwars_green] if score #bed_green bedwars matches 1 run return run function bedwars:respawn
execute if entity @s[team=bedwars_yellow] if score #bed_yellow bedwars matches 1 run return run function bedwars:respawn
function bedwars:out

data/bedwars/function/out.mcfunction

Eliminated: Observer for the remainder of the round.

gamemode spectator @s
tag @s remove bedwars_alive
execute store result score #alive bedwars if entity @a[tag=bedwars_alive]
tellraw @a ["",{"selector":"@s"},{"text":" выбывает. В игре: ","color":"gray"},{"score":{"name":"#alive","objective":"bedwars"}}]

data/bedwars/function/win.mcfunction

Winning: Titles, 10 s, a new round.

scoreboard players set #state bedwars 3
forceload remove -55 -55 55 55
execute if entity @a[tag=bedwars_alive,team=bedwars_red] run title @a title {"text":"Победили красные!","color":"red"}
execute if entity @a[tag=bedwars_alive,team=bedwars_blue] run title @a title {"text":"Победили синие!","color":"blue"}
execute if entity @a[tag=bedwars_alive,team=bedwars_green] run title @a title {"text":"Победили зелёные!","color":"green"}
execute if entity @a[tag=bedwars_alive,team=bedwars_yellow] run title @a title {"text":"Победили жёлтые!","color":"yellow"}
execute if score #teams bedwars matches 0 run title @a title {"text":"Ничья"}
tellraw @a {"text":"Новый раунд — через 10 с.","color":"gray"}
schedule function bedwars:restart 10s

data/bedwars/function/restart.mcfunction

New round: the arena is re-created, everyone is in the lobby.

scoreboard players set #state bedwars 0
function bedwars:build
tag @a remove bedwars_alive
execute as @a run function bedwars:lobby
tellraw @a ["",{"text":"Арена готова. Начать — "},{"text":"/trigger start","color":"gold","click_event":{"action":"run_command","command":"/trigger start"}},{"text":"."}]

What does the store sell?

A resident on each island is the game's normal trading window. Deals without limits: stock never runs out, price never goes up.

command Store

  • Command wool x16 4 Iron Ingot
  • Endernac x 12 24 Iron Ingot
  • Dumbboards x 16 4 Gold Ingot
  • Stone Sword 10 Iron Ingot
  • Iron Sword 7 Gold Ingot
  • Diamond Sword 4 Emerald
  • Iron Chestplate 12 Gold Ingot
  • Iron Pickaxe 6 Gold Ingot
  • Bow 12 Gold Ingot
  • Arrow x8 2 Gold Ingot
  • Golden Apple 3 Gold Ingot
  • Ender Pearl 4 Emerald

How to get started

  1. Download the datapack

    No need to unpack: the game reads it directly from the zip.

  2. Create a new world

    “Create a World” → “More” → “Data Sets” - drag the archive and enable it. On the server - put in world/datapacks before the first launch.

  3. Acknowledge the warning

    The game will call the settings experimental - that’s what it calls any world with its own generator. Click Continue.

  4. Get started

    Everyone is waiting in the glass lobby above the center. You need at least two: /trigger start - commands are given, countdown, and everyone is on their own island.

What you need to know

  • A bed is a life. As long as she's okay, the deceased is reborn on his island with a new command-colored armor and a wooden sword. It's broken, and it's "The Bed Broken!", and the next death is out of play.
  • You can't break your bed. I broke mine - it immediately gets back up. We need to break other people's.
  • Emptiness kills immediately. Whoever fell below the islands dies without half a minute of damage: with a whole bed - he will return, without it - he is out.
  • A command without players is without a bed. If no one is on the command at the start, its bed is removed and the island is empty.
  • The last command wins. Ten seconds later, the arena is rebuilt: the bridges are removed, the beds and shops are put in place, everything is in the lobby.
  • Empty world - only when created. Pak replaces the generator of an ordinary world with emptiness, and his game reads once - when the world is created.

Resident's own transactions - Trade generator, command nickname color - Generator /team, battle on islands without beds - SkyWars. Real 4x4 matches - on BedWars servers in monitoring.

Frequently asked questions

How to make BedWars in Minecraft without plugins?

download the date pack and add it to the creation of a new world: an empty world, an island of commands and a store of packs will build themselves. Round starts /trigger start, commands are distributed equally.

How does the BedWars store work without plugins?

Each island is home to a person with ready deals: wool and a stone sword for iron, an iron sword, and an ember for gold, a diamond sword, and pearls for emeralds. The window is just a game trade, and the stock doesn't run out.

What happens if you break a bed in BedWars?

As long as the bed's intact, the dead player is reborn on his island with a new armor. The bed was broken, and the next death is out of play. You can't break your bed.