mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-10-01 16:17:28 +02:00
Changed dragon eggs to be checked like it is a broken block in regions.
This commit is contained in:
parent
8c883e1ca8
commit
7f108ce8f0
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user