Always call boundary crossing handlers.
This commit is contained in:
1 parent
7c58fa4be6
commit
e5b76a571b
1 file changed
+3
-5
@@ -213,11 +213,9 @@ public class Session {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user