Fix patch 1 for issue #29, Clear all y axis data on teleport/switch worlds.

This commit is contained in:
Super Spy committed 2012-06-03 11:58:46 -05:00
1 parent a14f1cffdb
commit 92dfa04802
2 files changed
+16 -2

No files matched your search

@@ -59,6 +59,12 @@ public class PlayerListener extends EventListener
}
}
@EventHandler
public void onPlayerChangeWorlds(PlayerChangedWorldEvent event)
{
backend.logTeleport(event.getPlayer());
}
@EventHandler
public void onPlayerToggleSneak(PlayerToggleSneakEvent event)
{
@@ -165,7 +171,7 @@ public class PlayerListener extends EventListener
{
Player player = event.getPlayer();
backend.logAnimation(player);
}
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event)
@@ -761,7 +761,15 @@ public class Backend
public void logTeleport(final Player player)
{
logEvent(movingExempt,player,TELEPORT_TIME);
logEvent(movingExempt,player,TELEPORT_TIME);
/* Data for fly/speed should be reset */
nofallViolation.remove(player.getName());
flightViolation.remove(player.getName());
yAxisViolations.remove(player.getName());
yAxisLastViolation.remove(player.getName());
lastYcoord.remove(player.getName());
lastYtime.remove(player.getName());
}
public void logExitFly(final Player player)