mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 10:37:41 +01:00
Reverted change to use flag
This commit is contained in:
parent
d9aeb6afaa
commit
4ad8d362f7
@ -280,7 +280,8 @@ private void handleBlockLeftClick(PlayerInteractEvent event) {
|
||||
|| type == Material.TRAP_DOOR
|
||||
|| type == Material.NOTE_BLOCK) {
|
||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||
&& !set.canUse(localPlayer)) {
|
||||
&& !set.allows(DefaultFlag.USE)
|
||||
&& !set.canBuild(localPlayer)) {
|
||||
player.sendMessage(ChatColor.DARK_RED + "You don't have permission to use that in this area.");
|
||||
event.setUseInteractedBlock(Result.DENY);
|
||||
event.setCancelled(true);
|
||||
@ -417,7 +418,8 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
|| type == Material.TRAP_DOOR
|
||||
|| type == Material.WORKBENCH) {
|
||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||
&& !set.canUse(localPlayer)) {
|
||||
&& !set.allows(DefaultFlag.USE)
|
||||
&& !set.canBuild(localPlayer)) {
|
||||
player.sendMessage(ChatColor.DARK_RED + "You don't have permission to use that in this area.");
|
||||
event.setUseInteractedBlock(Result.DENY);
|
||||
event.setCancelled(true);
|
||||
@ -570,7 +572,8 @@ private void handlePhysicalInteract(PlayerInteractEvent event) {
|
||||
|
||||
if (type == Material.STONE_PLATE || type == Material.WOOD_PLATE) {
|
||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||
&& !set.canUse(localPlayer)) {
|
||||
&& !set.allows(DefaultFlag.USE)
|
||||
&& !set.canBuild(localPlayer)) {
|
||||
event.setUseInteractedBlock(Result.DENY);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user