mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-04 23:07:44 +01:00
Few renaming, use location already fetched.
This commit is contained in:
parent
41dd43f0de
commit
3ba0f93cb3
@ -328,7 +328,7 @@ public class MovingListener implements Listener {
|
|||||||
if (!from.getWorld().equals(to.getWorld()) || player.isInsideVehicle()){
|
if (!from.getWorld().equals(to.getWorld()) || player.isInsideVehicle()){
|
||||||
// TODO: move somewhere else (monitor)
|
// TODO: move somewhere else (monitor)
|
||||||
// TODO:
|
// TODO:
|
||||||
MovingData.getData(player).resetPositions(event.getTo());
|
MovingData.getData(player).resetPositions(to);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,14 +458,14 @@ public class MovingListener implements Listener {
|
|||||||
public final void onPlayerMoveMonitor(final PlayerMoveEvent event){
|
public final void onPlayerMoveMonitor(final PlayerMoveEvent event){
|
||||||
final long now = System.currentTimeMillis();
|
final long now = System.currentTimeMillis();
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
final Location loc = event.getTo(); // player.getLocation();
|
final Location to = event.getTo(); // player.getLocation();
|
||||||
final String worldName = loc.getWorld().getName();
|
final String worldName = to.getWorld().getName();
|
||||||
|
|
||||||
// Feed combined check.
|
// Feed combined check.
|
||||||
final CombinedData data = CombinedData.getData(player);
|
final CombinedData data = CombinedData.getData(player);
|
||||||
data.lastMoveTime = now;
|
data.lastMoveTime = now;
|
||||||
// Just add the yaw to the list.
|
// Just add the yaw to the list.
|
||||||
Combined.feedYawRate(player, loc.getYaw(), now, worldName, data);
|
Combined.feedYawRate(player, to.getYaw(), now, worldName, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user