This commit is contained in:
hyperdefined
2022-01-30 16:45:23 -05:00
parent 8305c52f3b
commit f970f17e7f
4 changed files with 4 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ import lol.hyper.toolstats.ToolStats;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Trident;
@@ -112,6 +113,9 @@ public class EntityDamage implements Listener {
@EventHandler
public void onDamage(EntityDamageEvent event) {
if (!(event.getEntity() instanceof LivingEntity)) {
return;
}
LivingEntity livingEntity = (LivingEntity) event.getEntity();
if (livingEntity instanceof Player) {
Player player = (Player) livingEntity;