diff --git a/src/main/java/xyz/nkomarn/Harbor/task/Checker.java b/src/main/java/xyz/nkomarn/Harbor/task/Checker.java index 4741413..731acd0 100644 --- a/src/main/java/xyz/nkomarn/Harbor/task/Checker.java +++ b/src/main/java/xyz/nkomarn/Harbor/task/Checker.java @@ -98,6 +98,8 @@ private static List getExcluded(final World world) { } private static boolean isExcluded(final Player player) { + final boolean excludedByAdventure = Config.getBoolean("exclusions.exclude-adventure") + && player.getGameMode() == GameMode.ADVENTURE; final boolean excludedByCreative = Config.getBoolean("exclusions.exclude-creative") && player.getGameMode() == GameMode.CREATIVE; final boolean excludedBySpectator = Config.getBoolean("exclusions.exclude-spectator") @@ -107,7 +109,7 @@ private static boolean isExcluded(final Player player) { final boolean excludedByVanish = Config.getBoolean("exclusions.exclude-vanished") && isVanished(player); - return excludedByCreative || excludedBySpectator || excludedByPermission || excludedByVanish || - Afk.isAfk(player) || player.isSleepingIgnored(); + return excludedByAdventure || excludedByCreative || excludedBySpectator || excludedByPermission || + excludedByVanish || Afk.isAfk(player) || player.isSleepingIgnored(); } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index bea948c..a766b0f 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -18,6 +18,7 @@ night-skip: exclusions: ignored-permission: true # Exclude players with the permission "harbor.ignored" from the sleeping count + exclude-adventure: true # Exclude players in adventure mode from the sleeping count exclude-creative: true # Exclude players in creative mode from the sleeping count exclude-spectator: true # Exclude players in spectator mode from the sleeping count exclude-vanished: true # Exclude vanished players from the sleeping count