Always call boundary crossing handlers.

This commit is contained in:
sk89q 2015-01-20 19:24:55 -08:00
parent 7c58fa4be6
commit e5b76a571b

View File

@ -213,11 +213,9 @@ public Location testMoveTo(Player player, Location to, MoveType moveType, boolea
Set<ProtectedRegion> entered = Sets.difference(toSet.getRegions(), lastRegionSet);
Set<ProtectedRegion> exited = Sets.difference(lastRegionSet, toSet.getRegions());
if (!entered.isEmpty() || !exited.isEmpty() || forced) {
for (Handler handler : handlers.values()) {
if (!handler.onCrossBoundary(player, lastValid, to, toSet, entered, exited, moveType) && moveType.isCancellable()) {
return lastValid;
}
for (Handler handler : handlers.values()) {
if (!handler.onCrossBoundary(player, lastValid, to, toSet, entered, exited, moveType) && moveType.isCancellable()) {
return lastValid;
}
}