1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-01-19 06:08:00 +01:00

Food for Godmode: There is no event for food yet, so we have to update it manually.

Test #939
This commit is contained in:
snowleo 2011-09-20 19:29:04 +02:00
parent 25dacffa12
commit b9c70cf071

View File

@ -26,6 +26,10 @@ public class EssentialsTimer implements Runnable
onlineUsers.add(user);
user.setLastOnlineActivity(currentTime);
user.checkActivity();
// Food for god mode
if (user.isGodModeEnabled() && user.getFoodLevel() < 20) {
user.setFoodLevel(20);
}
}
final Iterator<User> iterator = onlineUsers.iterator();