diff --git a/core/src/main/java/tc/oc/pgm/gamerules/GameRulesMatchModule.java b/core/src/main/java/tc/oc/pgm/gamerules/GameRulesMatchModule.java index dc3be19701..71050ef72b 100644 --- a/core/src/main/java/tc/oc/pgm/gamerules/GameRulesMatchModule.java +++ b/core/src/main/java/tc/oc/pgm/gamerules/GameRulesMatchModule.java @@ -24,7 +24,8 @@ public void load() { this.match .getWorld() .setGameRuleValue( - GameRule.DO_DAYLIGHT_CYCLE.getId(), Boolean.toString(!wtm.isTimeLocked())); + GameRule.DO_DAYLIGHT_CYCLE.getId(), + Boolean.toString(wtm != null && !wtm.isTimeLocked())); // second, set any gamerules defined in the map's XML // doDaylightCycle set in XML's gamerules module will take precedence over timelock