Changed dragon eggs to be checked like it is a broken block in regions.

This commit is contained in:
sk89q 2012-11-06 20:19:16 -08:00
parent 8c883e1ca8
commit 7f108ce8f0

View File

@ -652,6 +652,16 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
}
}
if (type == BlockID.DRAGON_EGG) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !set.canBuild(localPlayer)) {
player.sendMessage(ChatColor.DARK_RED + "You're not allowed to move dragon eggs here!");
event.setUseInteractedBlock(Result.DENY);
event.setCancelled(true);
return;
}
}
if (type == BlockID.LEVER
|| type == BlockID.STONE_BUTTON
|| type == BlockID.NOTE_BLOCK
@ -667,8 +677,7 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|| type == BlockID.WORKBENCH
|| type == BlockID.BREWING_STAND
|| type == BlockID.ENCHANTMENT_TABLE
|| type == BlockID.CAULDRON
|| type == BlockID.DRAGON_EGG) {
|| type == BlockID.CAULDRON) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !set.canBuild(localPlayer)
&& !set.allows(DefaultFlag.USE, localPlayer)) {