Skip to content

Commit

Permalink
fix food level change event error in console
Browse files Browse the repository at this point in the history
  • Loading branch information
SeriousGuy888 committed Oct 15, 2021
1 parent 0bc98f7 commit fd23da6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
public class FoodLevelChangeListener implements Listener {
@EventHandler
public void onFoodLevelChange(FoodLevelChangeEvent event) {
if(!(event.getEntity() instanceof Player))
return;

Player player = (Player) event.getEntity();
ItemStack item = event.getItem();
if(item == null)
Expand Down

0 comments on commit fd23da6

Please sign in to comment.