mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Fix patch 1 for issue #29, Clear all y axis data on teleport/switch worlds.
This commit is contained in:
1 parent
a14f1cffdb
commit
92dfa04802
2 files changed
+14
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
|
@EventHandler
|
||||||
public void onPlayerToggleSneak(PlayerToggleSneakEvent event)
|
public void onPlayerToggleSneak(PlayerToggleSneakEvent event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -762,6 +762,14 @@ public class Backend
|
|||||||
public void logTeleport(final Player player)
|
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)
|
public void logExitFly(final Player player)
|
||||||
|
|||||||
Reference in new issue
Block a user