Skip to content

Commit

Permalink
Fix script event bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 28, 2015
1 parent 4e5ebbc commit c54711a
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -126,13 +126,13 @@ public static boolean matchesScript(ScriptEvent sEvent, ScriptContainer script,
return false;
}
String cancelmode = getSwitch(event, "cancelled");
if (cancelmode.equalsIgnoreCase("false") && sEvent.cancelled) {
if (cancelmode != null && cancelmode.equalsIgnoreCase("false") && sEvent.cancelled) {
return false;
}
else if (cancelmode.equalsIgnoreCase("true") && !sEvent.cancelled) {
else if (cancelmode != null && cancelmode.equalsIgnoreCase("true") && !sEvent.cancelled) {
return false;
}
if (!getSwitch(event, "ignorecancelled").equalsIgnoreCase("true") && sEvent.cancelled) {
if (!checkSwitch(event, "ignorecancelled", "true") && sEvent.cancelled) {
return false;
}
return sEvent.matches(script, event);
Expand Down

0 comments on commit c54711a

Please sign in to comment.