Skip to content

Commit

Permalink
Quick-catch a potential flaw
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 31, 2017
1 parent ad4c477 commit 1ee7b49
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -49,7 +49,10 @@ public EntityEntersVehicleScriptEvent() {

@Override
public boolean couldMatch(ScriptContainer scriptContainer, String s) {
return CoreUtilities.getXthArg(1, CoreUtilities.toLowerCase(s)).equals("enters");
String lower = CoreUtilities.toLowerCase(s);
return CoreUtilities.getXthArg(1, lower).equals("enters")
// TODO: Ideally, match valid entity types
&& !CoreUtilities.getXthArg(2, lower).equals("biome");
}

@Override
Expand Down

0 comments on commit 1ee7b49

Please sign in to comment.