Skip to content

Commit

Permalink
fix playerHit error
Browse files Browse the repository at this point in the history
  • Loading branch information
meyason committed Oct 6, 2024
1 parent 19cedd3 commit 57132d3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ public void onPlayerHit(EntityDamageByEntityEvent event) {
if (event.getEntity().isDead()) {
return;
}
LivingEntity livingEntity = (LivingEntity) event.getEntity();
if (!(entity instanceof LivingEntity livingEntity)) {
return;
}
if (event.getDamager() instanceof Snowball snowball) {
if (!projectileData.containsKey(snowball)) {
return;
Expand Down

0 comments on commit 57132d3

Please sign in to comment.