Skip to content

Commit

Permalink
fix changes food level event
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 21, 2017
1 parent 62bd58f commit 029824c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -52,7 +52,7 @@ public EntityFoodLevelChangeScriptEvent() {

@Override
public boolean couldMatch(ScriptContainer scriptContainer, String s) {
return (CoreUtilities.toLowerCase(s).endsWith("changes food level"));
return (CoreUtilities.toLowerCase(s).contains("changes food level"));
}

@Override
Expand Down Expand Up @@ -104,7 +104,7 @@ public ScriptEntryData getScriptEntryData() {
@Override
public dObject getContext(String name) {
if (name.equals("entity")) {
return entity;
return entity.getDenizenObject();
}
else if (name.equals("food")) {
return new Element(food);
Expand Down

0 comments on commit 029824c

Please sign in to comment.