Skip to content

Commit 0f837e8

Browse files
committed
Check for cross-world movement
1 parent c631d67 commit 0f837e8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitPlayerListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ public void onPlayerMove(PlayerMoveEvent event) {
299299
last = lastLocations.get(p);
300300
}
301301
MCLocation movedTo = new BukkitMCLocation(to);
302+
if(!movedTo.getWorld().getName().equals(last.getWorld().getName())){
303+
lastLocations.put(p, movedTo);
304+
continue;
305+
}
302306
if (last.distance(movedTo) > threshold) {
303307
BukkitMCPlayerMoveEvent pme = new BukkitMCPlayerMoveEvent(event, threshold, last);
304308
EventUtils.TriggerListener(Driver.PLAYER_MOVE, "player_move", pme);

0 commit comments

Comments
 (0)