diff --git a/src/main/java/cn/dreeam/surf/modules/antiillegal/IllegalDamageAndPotionCheck.java b/src/main/java/cn/dreeam/surf/modules/antiillegal/IllegalDamageAndPotionCheck.java index f1b0d34..ca37851 100644 --- a/src/main/java/cn/dreeam/surf/modules/antiillegal/IllegalDamageAndPotionCheck.java +++ b/src/main/java/cn/dreeam/surf/modules/antiillegal/IllegalDamageAndPotionCheck.java @@ -33,7 +33,7 @@ public void onDamage(EntityDamageByEntityEvent event) { // Player => Entity if (event.getDamager() instanceof Player) { Player damager = (Player) event.getDamager(); - if (damager.getInventory().getItemInMainHand().getType() != Material.MACE && event.getDamage() > 30) { // Dreeam TODO: check illegal mace + if (!damager.getInventory().getItemInMainHand().getType().toString().equals("MACE") && event.getDamage() > 30) { // Dreeam TODO: check illegal mace event.setCancelled(true); damager.getInventory().remove(damager.getInventory().getItemInMainHand()); // Seems only can use item on main hand to attack Util.sendMessage(damager, Config.checkIllegalDamageMessage);