What does it do:
- This datapack can be used on any maps, it doesn't need to be a standalone map
- Enderpearls, chorus fruit, obsidian blocks, are automatically cleared from inventory in fallen kingdom areas
- You can create multiple fallen kingdom games, but only start one at the same time
- Up to 4 teams can be made, but you can use less
- TNT only works in teams bases, not anywhere else
- You must use the TNT from the merchant (see below), regular TNT won't work
- Some mobs like creeper are automatically to prevent grief, but the gamerule mobGriefing remains untouched! It means that if you've other stuff in your server or map, nothing will break
- You can manually set it up on a custom map (you decide yourself where each team's base is, where the chest of each team is hidden and so on), or you can set it up the easy and premade way in an empty, flat area, where all you'll have to do is build around and not mess with commands
Setup for a premade map:
(do not use any others functions on a premade map, it could grief it)
1) Permissions functions:
/function fallen_kingdom:get_fk_owner_permission_level (Grant you creative mode in protected areas)
/function fallen_kingdom:get_player_permission_level (You'll be in adventure mode in protected areas as if you were playing)
2) Gameplay setup functions:
/function fallen_kingdom:create_teams (It'll create 4 empty teams: red, blue, green, yellow)
/function fallen_kingdom:set_center (Define the center of the fallen kingdom! Once defined, a custom message will appear for players that are close to the center to let them know they are at the center)
/function fallen_kingdom:get_merchant_spawn_egg (Get a premade merchant spawn egg to place at the center or anywhere you'd like! This merchant sells premade usefull items, like TNT placeable in enemy teams, netherite upgrade...)
/function fallen_kingdom:protect_this (Protect the area from griefing in a 30 blocks radius, spherical. To avoid conflict in the chat, it's better to run /gamerule sendCommandFeedback false. Do not use this function near a team's base or in a team's base, bases have their own antigrief functions)
/function fallen_kingdom:reset_antigrief (remove the antigrief protection in a 50 blocks radius. Use this to undo the previous command)
/function fallen_kingdom:claim_blue (Claim the blue team's base position, 50 blocks radius, spherical! Make sure to use this functions below the base aswell to let players mine below their base, and to run /gamerule sendCommandFeedback false)
/function fallen_kingdom:claim_red (Claim the red team's base position, 50 blocks radius, spherical! Make sure to use this functions below the base aswell to let players mine below their base, and to run /gamerule sendCommandFeedback false)
/function fallen_kingdom:claim_green (Claim the green team's base position, 50 blocks radius, spherical! Make sure to use this functions below the base aswell to let players mine below their base, and to run /gamerule sendCommandFeedback false)
/function fallen_kingdom:claim_yellow (Claim the yellow team's base position, 50 blocks radius, spherical! Make sure to use this functions below the base aswell to let players mine below their base, and to run /gamerule sendCommandFeedback false)
/function fallen_kingdom:set_chest_blue (Set the position of the chest that others teams must find in order to win! Note: you'll have to manually place the chest, then run this commands whilst stepping on it)
/function fallen_kingdom:set_chest_red (Set the position of the chest that others teams must find in order to win! Note: you'll have to manually place the chest, then run this commands whilst stepping on it)
/function fallen_kingdom:set_chest_green (Set the position of the chest that others teams must find in order to win! Note: you'll have to manually place the chest, then run this commands whilst stepping on it)
/function fallen_kingdom:set_chest_yellow (Set the position of the chest that others teams must find in order to win! Note: you'll have to manually place the chest, then run this commands whilst stepping on it)
/function fallen_kingdom:reset_blue (Remove blue team's base protection if there are any, in a 50 blocks radius)
/function fallen_kingdom:reset_red (Remove red team's base protection if there are any, in a 50 blocks radius)
/function fallen_kingdom:reset_green (Remove green team's base protection if there are any, in a 50 blocks radius)
/function fallen_kingdom:reset_yellow (Remove yellow team's base protection if there are any, in a 50 blocks radius)
/function fallen_kingdom:reset_chest_blue (Remove blue team's chest if there are any, in a 50 blocks radius)
/function fallen_kingdom:reset_chest_red (Remove red team's chest if there are any, in a 50 blocks radius)
/function fallen_kingdom:reset_chest_green (Remove green team's chest if there are any, in a 50 blocks radius)
/function fallen_kingdom:reset_chest_yellow (Remove yellow team's chest if there are any, in a 50 blocks radius)
Setup for a new map
(must be on a flat area before using those commands)
1) Permissions functions:
/function fallen_kingdom:get_fk_owner_permission_level (Grant you creative mode in protected areas)
/function fallen_kingdom:get_fk_owner_permission_level (You'll be in adventure mode in protected areas as if you were playing)
2) Gameplay setup functions:
/function fallen_kingdom:setup (It'll setup everything for you at your current position, in a fair way gameplay wise (each bases are equal distance), and will create a lobby room to start the game or join teams. Use this in an empty or flat area. Each team will have a beacon placed in their base, and their chest will be automatically placed)
/function fallen_kingdom:reset_all (Reset everything! Some blocks will be removed)
Stuff will be cleared when starting the game!