Simplified some logic.

This commit is contained in:
tastybento 2018-02-06 13:35:17 -08:00
parent f7c4e5a988
commit 84d36a1a24

View File

@ -73,19 +73,19 @@ public class IslandsManager {
return false; return false;
} }
// In BSkyBlock, liquid may be unsafe // In BSkyBlock, liquid may be unsafe
if (ground.isLiquid() || space1.isLiquid() || space2.isLiquid()) { // Check if acid has no damage
// Check if acid has no damage if (plugin.getSettings().getAcidDamage() > 0D && (ground.isLiquid() || space1.isLiquid() || space2.isLiquid())) {
if (plugin.getSettings().getAcidDamage() > 0D) { // Bukkit.getLogger().info("DEBUG: acid");
// Bukkit.getLogger().info("DEBUG: acid"); return false;
return false;
} else if (ground.getType().equals(Material.STATIONARY_LAVA) || ground.getType().equals(Material.LAVA)
|| space1.getType().equals(Material.STATIONARY_LAVA) || space1.getType().equals(Material.LAVA)
|| space2.getType().equals(Material.STATIONARY_LAVA) || space2.getType().equals(Material.LAVA)) {
// Lava check only
// Bukkit.getLogger().info("DEBUG: lava");
return false;
}
} }
if (ground.getType().equals(Material.STATIONARY_LAVA) || ground.getType().equals(Material.LAVA)
|| space1.getType().equals(Material.STATIONARY_LAVA) || space1.getType().equals(Material.LAVA)
|| space2.getType().equals(Material.STATIONARY_LAVA) || space2.getType().equals(Material.LAVA)) {
// Lava check only
// Bukkit.getLogger().info("DEBUG: lava");
return false;
}
MaterialData md = ground.getState().getData(); MaterialData md = ground.getState().getData();
if (md instanceof SimpleAttachableMaterialData) { if (md instanceof SimpleAttachableMaterialData) {
//Bukkit.getLogger().info("DEBUG: trapdoor/button/tripwire hook etc."); //Bukkit.getLogger().info("DEBUG: trapdoor/button/tripwire hook etc.");