diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml index 7978100..7f1ec5c 100644 --- a/dependency-reduced-pom.xml +++ b/dependency-reduced-pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.gmail.artemis-the-gr8 PlayerStats - 1.4 + 1.5 diff --git a/pom.xml b/pom.xml index 31f4bfb..c05ba46 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.gmail.artemis-the-gr8 PlayerStats - 1.4 + 1.5 UTF-8 diff --git a/src/main/java/com/gmail/artemis/the/gr8/playerstats/reload/ReloadThread.java b/src/main/java/com/gmail/artemis/the/gr8/playerstats/reload/ReloadThread.java index 5b8efc6..6a92b81 100644 --- a/src/main/java/com/gmail/artemis/the/gr8/playerstats/reload/ReloadThread.java +++ b/src/main/java/com/gmail/artemis/the/gr8/playerstats/reload/ReloadThread.java @@ -13,12 +13,12 @@ import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.jetbrains.annotations.Nullable; - import java.util.Arrays; import java.util.Set; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ForkJoinPool; +import java.util.function.Predicate; public class ReloadThread extends Thread { @@ -91,10 +91,17 @@ public class ReloadThread extends Thread { "retrieved whitelist", time, DebugLevel.MEDIUM); } else if (config.excludeBanned()) { - Set bannedPlayers = Bukkit.getBannedPlayers(); - offlinePlayers = Arrays.stream(Bukkit.getOfflinePlayers()) - .parallel() - .filter(offlinePlayer -> !bannedPlayers.contains(offlinePlayer)).toArray(OfflinePlayer[]::new); + if (Bukkit.getPluginManager().getPlugin("LiteBans") != null) { + offlinePlayers = Arrays.stream(Bukkit.getOfflinePlayers()) + .parallel() + .filter(Predicate.not(OfflinePlayer::isBanned)) + .toArray(OfflinePlayer[]::new); + } else { + Set bannedPlayers = Bukkit.getBannedPlayers(); + offlinePlayers = Arrays.stream(Bukkit.getOfflinePlayers()) + .parallel() + .filter(offlinePlayer -> !bannedPlayers.contains(offlinePlayer)).toArray(OfflinePlayer[]::new); + } MyLogger.logTimeTaken("ReloadThread", "retrieved banlist", time, DebugLevel.MEDIUM); } diff --git a/src/main/resources/images/distance_format.png b/src/main/resources/images/distance_format.png new file mode 100644 index 0000000..4777aa0 Binary files /dev/null and b/src/main/resources/images/distance_format.png differ diff --git a/src/main/resources/images/time_format.png b/src/main/resources/images/time_format.png new file mode 100644 index 0000000..511d1f4 Binary files /dev/null and b/src/main/resources/images/time_format.png differ diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 5f8e8c1..ef0e542 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ main: com.gmail.artemis.the.gr8.playerstats.Main name: PlayerStats -version: 1.4 +version: 1.5 api-version: 1.18 description: adds commands to view player statistics in chat author: Artemis_the_gr8