Fixed rollbacks not checking world when teleporting players. (Fixes #453)
This commit is contained in:
parent
69c163468f
commit
9f3196dc97
1 changed files with 2 additions and 1 deletions
|
|
@ -1258,10 +1258,11 @@ public class Rollback extends Queue {
|
||||||
if (preview == 0) {
|
if (preview == 0) {
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
Location playerLocation = player.getLocation();
|
Location playerLocation = player.getLocation();
|
||||||
|
String playerWorld = playerLocation.getWorld().getName();
|
||||||
int chunkX = playerLocation.getBlockX() >> 4;
|
int chunkX = playerLocation.getBlockX() >> 4;
|
||||||
int chunkZ = playerLocation.getBlockZ() >> 4;
|
int chunkZ = playerLocation.getBlockZ() >> 4;
|
||||||
|
|
||||||
if (chunkX == finalChunkX && chunkZ == finalChunkZ) {
|
if (bukkitRollbackWorld.getName().equals(playerWorld) && chunkX == finalChunkX && chunkZ == finalChunkZ) {
|
||||||
Teleport.performSafeTeleport(player, playerLocation, false);
|
Teleport.performSafeTeleport(player, playerLocation, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue