mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-14 06:36:42 +01:00
Improve compatibility with the new onClearValue
This commit is contained in:
parent
bd1d772faa
commit
cb100bb797
@ -81,7 +81,9 @@ public boolean onCrossBoundary(LocalPlayer player, Location from, Location to, A
|
||||
protected abstract boolean onAbsentValue(LocalPlayer player, Location from, Location to, ApplicableRegionSet toSet, T lastValue, MoveType moveType);
|
||||
|
||||
protected void onClearValue(LocalPlayer player, ApplicableRegionSet set) {
|
||||
Location current = player.getLocation();
|
||||
onAbsentValue(player, current, current, set, lastValue, MoveType.OTHER_NON_CANCELLABLE);
|
||||
if (lastValue != null) {
|
||||
Location current = player.getLocation();
|
||||
onAbsentValue(player, current, current, set, lastValue, MoveType.OTHER_NON_CANCELLABLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,4 +59,8 @@ protected boolean onAbsentValue(LocalPlayer player, Location from, Location to,
|
||||
WorldGuard.getInstance().getPlatform().broadcastNotification(new Notify(player.getName(), " left NOTIFY region").create());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onClearValue(LocalPlayer player, ApplicableRegionSet set) {
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user