Skip to content

Commit dd88f73

Browse files
authored
fix sleeping to dream
1 parent 398869a commit dd88f73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/fr/openmc/core/features/dream/listeners/dream/PlayerSleepListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ public void onPlayerSleep(PlayerBedEnterEvent event) {
2929

3030
if (playersDreaming.contains(player.getUniqueId())) return;
3131

32-
playersDreaming.add(player.getUniqueId());
3332
Random random = new Random();
34-
3533
double randomValue = random.nextDouble();
3634

3735
if (randomValue < DreamManager.calculateDreamProbability(player)) return;
@@ -44,6 +42,8 @@ public void onPlayerSleep(PlayerBedEnterEvent event) {
4442
false,
4543
false
4644
));
45+
playersDreaming.add(player.getUniqueId());
46+
4747

4848
}
4949

0 commit comments

Comments
 (0)