Minecraft – How to create warp signs

minecraft-commandsminecraft-java-editionminecraft-java-edition-server

I am a staff member on a server, wanting to build a Capture the Flag section. I need to know how to make warp signs that let you teleport away, and only allow a certain amount of people to join.

Best Answer

Just for your information, this is /tp not /mvtp, so it can only teleport you to somewhere in the same world

Fist off, run this command:

/give @p sign 1 0 {BlockEntityTag: {Text1: "{text:\"Teleport\",color:\"green\",bold:true,clickEvent {action:\"run_command\",value:\"/teleport @p[r=4] <x> <y> <z>\"}}"},display:{Name: "Custom Sign"}}

This will teleport the closest player within 4 blocks to whatever you make the x y and z

I'm not sure about the limited player thing, but you could make a scoreboard ( /scoreboard objectives add <name> Dummy )

Add a testfor command that tests for everyone within a 100 block radius ( /testfor @a[r=100] )

And connect a comparator to it that has redstone attached to it which runs to a command block. (/testfor works with command blocks that makes it if there were 10 people within the 100 block area, it would put out 10 redstone charge).

This is as much as I can figure, Hope I helped!