WolfNetDevelopment / Wormhole-X-Treme

WormholeXTreme is a Stargate plugin for CraftBukkit
http://jira.luricos.de/browse/Wormhole
Other
25 stars 17 forks source link

Do nothing for players that don't actually move a block!! #20

Closed dumptruckman closed 12 years ago

dumptruckman commented 12 years ago

Significant performance increase.

drantor commented 12 years ago

What is if the Player moved in the Worlds but same x, y, z and the Location.equals can compare them too can't it?

dumptruckman commented 12 years ago

@drantor if they're not changing x, y, z coordinates, why does the event matter? Also, no, Location.equals does NOT work for this kind of situation. event.getFrom().equals(event.getTo()) will ALWAYS be false or else the PlayerMoveEvent would never fire. If you look at the code for Location.equals it compares every aspect of both locations, down to the decimal places and including player's pitch and yaw (looking around).

drantor commented 12 years ago

Okay then +1 :3