[MC-552] Command block choosing wrong people / Selecting players cross-dimensional Created: 25/Oct/12  Updated: 16/Jun/13  Resolved: 14/Jun/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Minecraft 1.4.7, Minecraft 1.5
Fix Version/s: Snapshot 13w24b

Type: Bug
Reporter: David Cohoe Assignee: [Mojang] Nathan Adams
Resolution: Fixed Votes: 12
Labels: None
Environment:

64-bit Windows Vista


CHK:
Confirmation Status: Confirmed

 Description   

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   
Comment by spetznack [ 16/Jun/13 ]

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?

Comment by [Mojang] Nathan Adams [ 14/Jun/13 ]

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
Comment by spetznack [ 24/Mar/13 ]

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).

Comment by spetznack [ 21/Mar/13 ]

@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..

Comment by Ryan Leach [ 20/Mar/13 ]

> 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.

Comment by Tails [ 14/Mar/13 ]

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by spetznack [ 31/Jan/13 ]

This problem is now fixed for craftbukkit. Commandblocks only selects players in the same world that the commandblock is in. Tested it yesterday and it works

Comment by spetznack [ 07/Jan/13 ]

the @?(search arguments) defines where the command block will search for players.
Basicly the "@?(search arguments)" will replace itself with the player(s) it found through the search parameter.

so for example:
/spawnpoint @a(0,100,0)
will look like this if the search only chooses one player: (in this case me)
/spawnpoint spetznack

adding a dimension parameter to the /command itself will not affect the way players are chosen At least that's what sounds logical to me ^^

Comment by Michael Irvine [ 07/Jan/13 ]

would it be in the parameters though? Like instead of being /tp@pd=0 0 100 0, perhaps it could be /tp @p [d=0] 0 100 0. Then it would fit in with all the other perameters. If you didn't put this in, like spetznack said, it would do the world that the command block is in.

Comment by spetznack [ 07/Jan/13 ]

That is a very good idea, although we would still want it to be default at the world the command block is in right? (not super important but it would make things easier ^^)

Comment by Anon Ymus [ 18/Dec/12 ]

I think a fix would be to add a dIMENSION parameter (for example, /tp @p [ d=0 ] 0 100 0).

Comment by gareth taylor [ 18/Dec/12 ]

This is a very severe issue for me! I need to be able to use large search areas for my tp commands, right now it is making people in other worlds teleport to death! Please do something to fix this issue.

Comment by spetznack [ 11/Nov/12 ]

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.. :/

Comment by David Cohoe [ 11/Nov/12 ]

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

Comment by Black Sheep [ 10/Nov/12 ]

Need this fixed.

Comment by spetznack [ 10/Nov/12 ]

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..

Comment by spetznack [ 10/Nov/12 ]

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!!

Generated at Sun Jan 12 11:51:25 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.