1

I am staff on a server and we are adding in a creative world which is already set up. I need a way for other non-staff people to get there. I thought command blocks! But I am having the trouble where when I type in @P it does not select the right person. What should I do?

1
  • How do you add worlds to a server? Commented Dec 8, 2016 at 6:52

3 Answers 3

4

Your problem is that selectors are case sensitive, and thus @P does not work; you need to type @p (lower-case "p") instead.

After that, it's important to note that @p selects the closest player. I don't know what your criteria are for whom the "right person" to teleport is; if you just want to select the closest player to the command block then just @p should work fine, but otherwise you will need to use selector arguments. The Minecraft Wiki has a good page section on them; you can select people by their position, scoreboard scores, team, etc..

2

This is the exact same thing I did on my public server. The unfortunate part is that it will select the player closest to the command block.

A possible solution is to make it hard for more than one person to be near the command block. At first we made the button in a location where the player would funnel into a 1x1 space and all space around the command block for 3x3 were solid blocks.

Another solution you could do is use a @p[x=nx, y=ny, z=nz, r=1] where nx, ny, nz are the coords of the player you want to affect and r=1 means only select for a radius of 1 block. For example you could /tpx @p[x=50,y=64,z=46,r=1] ......

Inside the [...] you can also add m=mn where mn is gamemode number you want to select for. And to be absolutely certain you don't move too many people, you can also add c=max where max is the max number of matches you want the selector to find.

The built in command /tp does not allow for moving players between worlds or dimensions.

If you have Mystcraft you can use /tpx @p[x=nx, y=ny, z=nz, r=1] <dimensionid> <x> <y> <z>

If you are using Multiverse you can use /mvtp @p[x=nx, y=ny, z=nz, r=1] <dimensionid> <x> <y> <z>

With Multiworld plugin you can use /mw move @p[x=nx, y=ny, z=nz, r=1] <dimensionid>

If you have Essentials installed you can just create a 'warp' and then players who have the permission can themselves use /warp <warpname>

Final Note: As far as I know, all commands are lowercase and most components of commands are as well. The only exceptions are the gameRules, achievements, scoreboards and NBT tags. If you are uncertain of a commands format, you can use tab completion on the command line (and I don't recall if they added this to command blocks already).

If you are using any other plugin or mod you would like help with, leave a comment and I will add it to my answer.

2
  • ....and lest I forget, once you go bold, you never feel old :)
    – ydobonebi
    Commented Jul 27, 2015 at 23:56
  • /tpx @p[m=2, c=1, r=3] -1 2 2 2 <---- :) Try that one of for some confusion try /tpx @r[c=15, r=1600] 1 250 250 250 <--- Let the screaming begin....
    – ydobonebi
    Commented Jul 28, 2015 at 0:16
0

Command blocks don't let you move between servers if that's what your asking. @p is closest player, @a is all players, @r is a random player, and @e is all entities. You could use something like @a[name!=staffMember1,name!=staffMember2,name!=staffMember3] to select all non-staff players for whatever it is you are doing! Hope this helps!

1
  • please do not make edits because you think something is incorrect. != is short hand code for "does not equal", and in this context, it appears valid.
    – user106385
    Commented Jul 28, 2015 at 0:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .