mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-30 12:01:22 +01:00
Check if the player's food level is at its maximum
A few foods can be eaten with the maximum food level. This prevents payment in that situation.
This commit is contained in:
parent
8f1402ff72
commit
89c7aae6ef
@ -1642,7 +1642,7 @@ public final class JobsPaymentListener implements Listener {
|
||||
|
||||
Player player = (Player) human;
|
||||
|
||||
if (!player.isOnline() || event.getFoodLevel() <= player.getFoodLevel())
|
||||
if (!player.isOnline() || event.getFoodLevel() <= player.getFoodLevel() || player.getFoodLevel() == 20)
|
||||
return;
|
||||
|
||||
// check if in creative
|
||||
|
Loading…
Reference in New Issue
Block a user