Left-click to select the first corner of the region
Right-click to select the second corner
Type the command
//set dirt to change all selected blocks to dirt
You should then have a large flat area like this:
Use the command
//paste to paste the arena schematic into your world.
NOTE: If it is positioned poorly, you can use the command
//undo to remove it and try pasting it from somewhere else or sculpt your world a bit more before pasting.
NOTE: You will have some time to customize your arena during free play, for now just add the banners.
We will be starting the players in their base, sending them to jail when hit, and then returning them to their base from jail after 10 seconds. To do this we will need to know the coordinates of those locations in the arena.
X, Y, Z, PITCH, and YAW are placeholders, we will replace them with actual values in the next step.
We will use these values as the teleport location for the red base.
NOTE Always round to the nearest half or whole number (half will place you on the center of a block) don't bother with the decimal places.
In this example, we will say
var redBase = location(world, -217.5, 84, 311, 180, -2.5);
Replace the placeholders with the actual values in your code:
Every time a player throws a snowball, give them a new one after 500 milliseconds. This will prevent the players from holding down the fire button to spam snowballs, they will have to aim with a fire rate of only 2/sec. Feel free to adjust the fire rate if you want, the slower the rate the more important aiming will become.
With two players on the server, type
/js startCTF() to start the game. You should be given a snowball and placed in your base. Test your ability to hit the opposing player with a snowball and send them to jail. They should return after 10 seconds, and the player who landed the hit should have their score increase by one. When you are finished testing, type
/js stopCTF() to test ending the game.