Skip to content

Commit

Permalink
fix time changes bug introduced by recent commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 17, 2020
1 parent 0b9f9ea commit 57af39e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -53,6 +53,10 @@ public boolean matches(ScriptPath path) {
if (path.eventArgLowerAt(2).equals("in") && !runGenericCheck(path.eventArgLowerAt(3), world.getName())) {
return false;
}
String arg1 = path.eventArgLowerAt(1);
if (!arg1.equals("changes") && !arg1.equals(String.valueOf(hour))) {
return false;
}
return super.matches(path);
}

Expand Down
Expand Up @@ -56,6 +56,7 @@ public void timeEvent() {

if (!current_time.containsKey(currentWorld.identifySimple())
|| current_time.get(currentWorld.identifySimple()) != hour) {
current_time.put(currentWorld.identifySimple(), hour);
TimeChangeScriptEvent.instance.hour = hour;
TimeChangeScriptEvent.instance.world = currentWorld;
TimeChangeScriptEvent.instance.fire();
Expand Down

0 comments on commit 57af39e

Please sign in to comment.