Skip to content

Commit

Permalink
Merge pull request #150 from mrgeneralq/hotfix
Browse files Browse the repository at this point in the history
fixed time cycle bug
  • Loading branch information
mrgeneralq committed Sep 15, 2022
2 parents 1dd3bdf + e611b40 commit 29656b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ bin/*

# Maven
target/

dependency-reduced-pom.xml
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>me.mrgeneralq</groupId>
<artifactId>sleep-most</artifactId>
<version>5.1.2</version>
<version>5.1.3</version>
<name>SleepMost</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/mrgeneralq/sleepmost/Sleepmost.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void runPreTimerTasks(){
for(World world: Bukkit.getWorlds()){
this.bootstrapper.getSleepMostWorldService().registerWorld(world);

if(ServerVersion.CURRENT_VERSION.supportsGameRules())
if(ServerVersion.CURRENT_VERSION.supportsGameRules() && this.bootstrapper.getSleepService().isEnabledAt(world))
world.setGameRule(GameRule.DO_DAYLIGHT_CYCLE, true);
}
}
Expand Down

0 comments on commit 29656b5

Please sign in to comment.