Few renaming, use location already fetched.

This commit is contained in:
asofold 2012-10-22 17:27:23 +02:00
parent 41dd43f0de
commit 3ba0f93cb3

View File

@ -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);
} }
/** /**