mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-03 01:19:42 +01:00
Remove use of GlobalRegionManager in RegionProtectionListener.
This commit is contained in:
parent
dc2652f87b
commit
19b87b628a
@ -87,10 +87,10 @@ public void onBreakBlock(BreakBlockEvent event) {
|
|||||||
Location target = event.getTarget();
|
Location target = event.getTarget();
|
||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (!getPlugin().getGlobalRegionManager().canBuild(player, target)) {
|
RegionQuery query = getPlugin().getRegionContainer().createQuery(player);
|
||||||
tellErrorMessage(player, target);
|
boolean canBreak = query.testPermission(target);
|
||||||
event.setCancelled(true);
|
|
||||||
} else if (!getPlugin().getGlobalRegionManager().canConstruct(player, target)) {
|
if (!canBreak) {
|
||||||
tellErrorMessage(player, target);
|
tellErrorMessage(player, target);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user