summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-10-04 09:05:04 +0100
committerKHobbits <rob@khobbits.co.uk>2011-10-04 09:05:04 +0100
commit0297d22fac67915116e6be3aadc117519193b8ce (patch)
tree8d40c0d7ec29739c089ff45b82a89aaededcd5ac
parent608ebfdb4abef3b29e6a00c41a040452b0420be9 (diff)
downloadEssentials-0297d22fac67915116e6be3aadc117519193b8ce.tar
Essentials-0297d22fac67915116e6be3aadc117519193b8ce.tar.gz
Essentials-0297d22fac67915116e6be3aadc117519193b8ce.tar.lz
Essentials-0297d22fac67915116e6be3aadc117519193b8ce.tar.xz
Essentials-0297d22fac67915116e6be3aadc117519193b8ce.zip
FoodLevelChange event, update.
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
index 2eda73540..f5d6cec48 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
@@ -84,10 +84,12 @@ public class EssentialsEntityListener extends EntityListener
@Override
public void onFoodLevelChange(FoodLevelChangeEvent event)
- {
+ {
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
- {
+ {
+ //TODO: Remove the following line, when we're happy to remove backwards compatability with 1185.
event.setFoodLevel(20);
+ event.setCancelled(true);
}
}
}