1
0
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:
FireML 2023-05-17 12:32:13 +01:00
parent 8f1402ff72
commit 89c7aae6ef

View File

@ -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