Prevent breaking banners in zones the player does not have build access in

This commit is contained in:
AlexTheCoder 2017-04-23 22:21:37 -04:00
parent 9829527688
commit 8ea90eb914

View File

@ -10,6 +10,7 @@ import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.block.BlockPlaceEvent;
@ -170,7 +171,7 @@ public class BannerManager extends MiniPlugin
}
}
@EventHandler
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBreak(BlockBreakEvent event)
{
if (event.getBlock().getType() == Material.STANDING_BANNER || event.getBlock().getType() == Material.WALL_BANNER)