mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-28 05:25:20 +01:00
Fixed region bypass.
This commit is contained in:
parent
e8fb3e6d24
commit
dcc1b59627
@ -181,7 +181,8 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
|| block.getType() == Material.BURNING_FURNACE
|
||||
|| block.getType() == Material.NOTE_BLOCK)) {
|
||||
|
||||
if (!set.allows(DefaultFlag.CHEST_ACCESS)
|
||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||
&& !set.allows(DefaultFlag.CHEST_ACCESS)
|
||||
&& !set.canBuild(localPlayer)) {
|
||||
player.sendMessage(ChatColor.DARK_RED + "You don't have permission for this area.");
|
||||
event.setCancelled(true);
|
||||
@ -190,7 +191,8 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
}
|
||||
|
||||
if (type == Material.LEVER || type == Material.STONE_BUTTON) {
|
||||
if (!set.allows(DefaultFlag.USE)
|
||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||
&& !set.allows(DefaultFlag.USE)
|
||||
&& !set.canBuild(localPlayer)) {
|
||||
player.sendMessage(ChatColor.DARK_RED + "You don't have permission for this area.");
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user