mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2025-03-02 04:01:25 +01:00
Fixed rollbacks not checking world when teleporting players. (Fixes #453)
This commit is contained in:
parent
69c163468f
commit
9f3196dc97
@ -1258,10 +1258,11 @@ public class Rollback extends Queue {
|
||||
if (preview == 0) {
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
Location playerLocation = player.getLocation();
|
||||
String playerWorld = playerLocation.getWorld().getName();
|
||||
int chunkX = playerLocation.getBlockX() >> 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user