mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-26 20:45:43 +01:00
Always call boundary crossing handlers.
This commit is contained in:
parent
7c58fa4be6
commit
e5b76a571b
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user