Skip to content

Commit

Permalink
Merge pull request #93 from TheNextLvl-net/fix-un-target
Browse files Browse the repository at this point in the history
Fix error when an entity un-targets another entity
  • Loading branch information
NonSwag authored Nov 18, 2024
2 parents 7a52f97 + 7a13024 commit c884054
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void onFoodLevelChange(FoodLevelChangeEvent event) {

@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onEntityTarget(EntityTargetEvent event) {
if (event.getTarget() == null) return;
var area = plugin.areaProvider().getArea(event.getEntity());
var flag = event.getTarget() instanceof Player
? plugin.flags.entityAttackPlayer
Expand Down

0 comments on commit c884054

Please sign in to comment.