Skip to content

Commit

Permalink
Improve lower version compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jul 19, 2024
1 parent 2574a7d commit 7aec7d8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7aec7d8

Please sign in to comment.