So, I am making a mini game and I want it to put all of the players in one of the five maps that they have selected. I put bedrock walls about 20 blocks high all around the map, and barriers on the ceiling. However, whenever I do a test run, I am put on the barrier roof above the map. How to I make it so that it will put them under the roof? This is the command I am using, spreadplayers -35 -14 10 11 false @a[team=Game]
. Thanks for any answers!
Minecraft – Need help with /spreadplayers command
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – Help With (supposedly) Simple Command
- Minecraft – I need help with /testfor command
- Minecraft Java Edition – Need Help with Commands
- Minecraft Commands – How to Check if Only 1 Player on Team in Minecraft 1.12
- Minecraft – How to make a value-dependent variable scoreboard objective? (Command Blocks, 1.16.5)
Best Answer
This is by design, unfortunately; spreadplayers will place players on the highest block on the x/z coordinate it picked.
There is a decent workaround I can think of though: right after the game finishing spreading players, teleport all players 3 blocks or so down (with resistance 5 to stop fall damage). So your command set would look something like this:
This will spread players, give them resistance 5 for 60 seconds, and teleport them below the barrier allowing them to fall below it. There are some edge cases where this will not work though: for example, your players might end up in a lava lake or an ocean, since this set does not check to see that the block below the player is solid, so keep that in mind.