When you use a /testfor
command, you can't use specific usernames to test for people on the server/world.
When testing for people with your score IsReady
, use:
/testfor <selector(@p)>[score_IsReady=1]
So when someone is near by the commandblock, it will return true only if someone has IsReady=1.
Yes that is possible! It is actually very easy...
Command Set Up
If you want to get a player from a area you need a target selector. For your example the @a
fits the best. If you have a target selector you are able to use target selector arguments. And with them you are able to define the area.
There are some more possibilities than the one I show you. I recommend you to select the players by volume. That means you have two points and all players within these points are selected.
[dx=DX,dy=DY,dz=DZ]
Selects only targets within the volume defined as starting from the location where the command was executed and extending DX blocks in
the positive "x" direction (i.e., east), DY blocks in the positive "y"
direction (i.e., upwards), and DZ blocks in the positive "z" direction
(i.e., south). All values must be positive.
Usage of selection by volume from the minecraft gamepedia.
The command I use looks like this:
/tp @a[dx=10,dy=10,dz=10] -1718 63 -127
Here is the explaination of the command if you do not know how to use it!
The syntax of a tp command looks like this:
/tp [target player] <x> <y> <z>
The target player in your example are all players in the area. So you have to use the @a
what selects all players.
Furthermore you need something that restricts that @a
so that only the players in a area are selected. For that you need the selection by volume. It is written right behind the @a
.
As I said before you need two points to select a area. The first point (1 in the picture) is the commandblock and you do not need to type it in the command. The secound point (2 in the picture) needs to be in the command.
So you have to type the information how far this point is away from the commandblock. In my example I made a cube wich is 10x10x10 big. So I have to type [dx=10, dy=10, dz=10] and the area gets expanded by ten on each side.
The last three digits are the coordinates where you want to teleport the players. The first is the x, the secound the y and the last the z.
You are able to see the coordinates if you press F3 on your keyboard.
Automatic Teleporting Set Up
I do not know now if you want to teleport the player if he enterd the area or if you press a button. If you want to control it you just have to add a button with redstone to the commandblock.
If you want that a player is teleported when he is entering the area you have to use a redstone clock. Keep in mind that a redstone clock needs some server ressources. So use them as less as possible!
You are able to turn the teleportation on and off with the levler of the clock.
Best Answer
this is considered a simple command in Minecraft, but I think I can help you. To teleport a player, have them either step on a pressure plate, press a button, or switch a lever that is next to a command block with the command
/tp @p x y z
When I sayx y z
I mean the coordinates that you want to teleport the player to. To get those coordinates, go to the location you want the player(s) to teleport to, and press the keys:fn+f3
(function key and the f3 key.) On one of the rows of text in the upper left-center, there will be something likex=46.33263 y=3643.532366 z=125.23146
. You do not need the decimals to teleport the player, so just remember the numbers46,3643,125
or whatever your set of numbers may be. Simply replace thex y z
that you put into the command block with these numbers, and Ta Da! (Also, if one or more of these numbers are negative, then the number put into the command block ALSO has to be a negative number.) Just in case you didn't know, to get a command block, you do/give @p minecraft:command_block
Hope this Helps!
-A