Fixed instantaneous breaking unbreakable blocks
This commit is contained in:
@@ -4,6 +4,7 @@ import com.willfp.eco.core.integrations.anticheat.AnticheatManager;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockDamageEvent;
|
||||
@@ -29,6 +30,14 @@ public class Instantaneous extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (block.getType().getHardness() > 100) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (block.getType() == Material.BEDROCK) {
|
||||
return;
|
||||
}
|
||||
|
||||
AnticheatManager.exemptPlayer(player);
|
||||
|
||||
event.setInstaBreak(true);
|
||||
|
||||
Reference in New Issue
Block a user