Skip to content

Commit

Permalink
Fix entity spawns event
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 29, 2015
1 parent fa715a4 commit 579f78e
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -25,9 +25,9 @@ public class EntitySpawnScriptEvent extends BukkitScriptEvent implements Listene
// <--[event]
// @Events
// entity spawns
// entity spawns (in <area>) (because <cause>)
// entity spawns (because <cause>) (in <area>)
// <entity> spawns
// <entity> spawns (in <area>) (because <cause>)
// <entity> spawns (because <cause>) (in <area>)
//
// @Cancellable true
//
Expand Down Expand Up @@ -73,8 +73,8 @@ public boolean matches(ScriptContainer scriptContainer, String s) {
return false;
}

if (CoreUtilities.xthArgEquals(4, lower, "because")) {
return CoreUtilities.getXthArg(5, lower).equals(reason.toString());
if (CoreUtilities.xthArgEquals(2, lower, "because")) {
return CoreUtilities.getXthArg(3, lower).equalsIgnoreCase(reason.toString());
}
return true;
}
Expand Down

0 comments on commit 579f78e

Please sign in to comment.