mirror of
https://github.com/nkomarn/harbor.git
synced 2025-01-20 06:21:26 +01:00
⚡ Exclude players in adventure mode
This commit is contained in:
parent
792328de46
commit
560f0f1a8d
@ -98,6 +98,8 @@ public class Checker implements Runnable {
|
||||
}
|
||||
|
||||
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 @@ public class Checker implements Runnable {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user