mojira.dev
MC-552

Command block choosing wrong people / Selecting players cross-dimensional

When using @p for command blocks (in the overworld is the only one tested), if there is no closest player (easier to do with the radius) it will take someone from the nether or the end instead.

Comments 17

Yes, I have the exact same issue with the_end, also on bukkit servers with multiverse (which enables us to create more worlds than the original 3 vanilla worlds) we are having the same problem there. :/ For me this is a BIG PROBLEM, it makes command blocks in a adventure world teleport people from survival world!!

How to simply replicate:
1. Requires two players
2. Make a command block at coordinate 0 100 0 in overworld
3. Type in this: /tp @p 0 120 0
4. Get 2.nd player in creative and tp him to 0 100 0 in the nether.
5. 1.st player should stand a couple blocks away from the command block and the activate it.

What will happen:
Bascily the server will search the coordinates for the closest player to the search area, no matter what world he is in.

With this exact command it will tp the 2.nd player from 0 100 0 to 0 120 0 even if the command block is in another world than the 2.nd player..

It also still works even if the player in the nether is thousands of blocks away from area it is searching at.

This is not only a problem with /tp commands, it's the general @p that is not world sensitive, tested it out with @r and @a, it's the same with them aswell.. :/

7 more comments

> This problem is now fixed for craftbukkit.

This is not bukkits JIRA, a fix in craftbukkit does not necessarily mean it has been fixed for vanilla.

@Ryan Leach
Sorry for not being more specific, the problem is fixed for bukkit servers now. Here is the bug-tracker:https://bukkit.atlassian.net/plugins/servlet/mobile#issue/view/BUKKIT-3515

The problem exists in vanilla 1.4.7, I will try to start a 1.5 vanilla server and test it out with someone later today..

Just tested for 1.4.7 and 1.5, the command blocks is still selecting players cross-dimentional.

Here is the setup: http://i.imgur.com/CE0q1Zb.jpg
One person stood right next to the command block in Overworld and pressed it while I was in nether (I also tried in The End, same result).

Player selectors with the following arguments will ensure that the resulting player(s) are on the same world:

  • Range minimum

  • Range maximum

  • X coordinate

  • Y coordinate

  • Z coordinate

in other words, @a will select ALL players on the server but if you add one of those arguments for example

@a[r=50]

it will only select people within that radius in that world* right?

David Cohoe

Nathan Adams

Confirmed

Minecraft 1.4.2, Minecraft 1.4.7, Minecraft 1.5

Snapshot 13w24b

Retrieved