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 1a65a31a7e
commit cf69a6d72c

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();