From 9ab6362e971488cee92510df6720968580ccc41d Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Sun, 14 Jun 2020 17:05:52 +0200 Subject: [PATCH] removed ignoreSleep as it was causing more problems than it solves --- src/main/java/xyz/louisvallat/sweetdreams/SweetDreams.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/xyz/louisvallat/sweetdreams/SweetDreams.java b/src/main/java/xyz/louisvallat/sweetdreams/SweetDreams.java index 5765512..3e6efe7 100644 --- a/src/main/java/xyz/louisvallat/sweetdreams/SweetDreams.java +++ b/src/main/java/xyz/louisvallat/sweetdreams/SweetDreams.java @@ -36,7 +36,6 @@ public final class SweetDreams extends JavaPlugin implements Listener { final Player player = event.getPlayer(); final World world = player.getWorld(); if (event.getBedEnterResult() == PlayerBedEnterEvent.BedEnterResult.OK) { - player.setSleepingIgnored(true); sleepingSchedulers.put(player, this.getServer().getScheduler().scheduleSyncDelayedTask(this, () -> { if (world.isThundering()) world.setThundering(false); else world.setTime(1000); @@ -49,6 +48,5 @@ public final class SweetDreams extends JavaPlugin implements Listener { @EventHandler(priority = EventPriority.LOWEST) public void onWake(PlayerBedLeaveEvent event) { this.getServer().getScheduler().cancelTask(sleepingSchedulers.get(event.getPlayer())); - event.getPlayer().setSleepingIgnored(false); } }