File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -291,14 +291,12 @@ public void onPlayerMove(PlayerMoveEvent event) {
291291 String p = event .getPlayer ().getName ();
292292 for (Integer threshold : PlayerEvents .GetThresholdList ()) {
293293 Map <String , MCLocation > lastLocations = PlayerEvents .GetLastLocations (threshold );
294+ MCLocation last ;
294295 if (!lastLocations .containsKey (p )) {
295- lastLocations .put (p , new BukkitMCLocation (from ));
296- continue ;
297- }
298- MCLocation last = lastLocations .get (p );
299- if (!to .getWorld ().getName ().equals (last .getWorld ().getName ())) {
300- lastLocations .put (p , new BukkitMCLocation (to ));
301- continue ;
296+ last = new BukkitMCLocation (from );
297+ lastLocations .put (p , last );
298+ } else {
299+ last = lastLocations .get (p );
302300 }
303301 MCLocation movedTo = new BukkitMCLocation (to );
304302 if (last .distance (movedTo ) > threshold ) {
You can’t perform that action at this time.
0 commit comments