Fix for stacked Dragon egg teleporting

This commit is contained in:
Fabrizio La Rosa 2020-06-30 23:01:52 +02:00
parent f3f3e484d7
commit 214756e41e

View File

@ -164,7 +164,13 @@ public class Interact implements Listener {
} else {
heldType = CompatibleMaterial.AIR;
}
if (stackableManager != null && block != null && stackableManager.isStacked(block.getLocation())) {
if(blockType.equals(CompatibleMaterial.DRAGON_EGG)){
event.setCancelled(true);
}
}
if (stackableManager != null && stackableManager.isStackableMaterial(heldType) && blockType == heldType
&& !player.isSneaking() && skyblock.getPermissionManager().hasPermission(player, island, "Place")
&& (!skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "config.yml")).getFileConfiguration().getBoolean("Island.Stackable.RequirePermission")