diff --git a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java index d2e0854d..1e9d834d 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java @@ -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)) {