diff --git a/Plan/build.gradle b/Plan/build.gradle index 2c0a25a40..af3475c85 100644 --- a/Plan/build.gradle +++ b/Plan/build.gradle @@ -12,7 +12,7 @@ allprojects { wrapper.gradleVersion = "5.0" group "com.djrapitops" - version "4.6.0-SNAPSHOT" + version "4.6.1-SNAPSHOT" test { testLogging { @@ -42,11 +42,11 @@ subprojects { sourceCompatibility = 1.8 targetCompatibility = 1.8 - ext.daggerVersion = "2.20" - ext.daggerCompilerVersion = "2.20" + ext.daggerVersion = "2.21" + ext.daggerCompilerVersion = "2.21" ext.abstractPluginFrameworkVersion = "3.4.1" - ext.planPluginBridgeVersion = "4.6.0-1" + ext.planPluginBridgeVersion = "4.6.1" ext.bukkitVersion = "1.12.2-R0.1-SNAPSHOT" ext.spigotVersion = "1.12.2-R0.1-SNAPSHOT" diff --git a/Plan/bungeecord/src/main/java/com/djrapitops/plan/system/listeners/bungee/PlayerOnlineListener.java b/Plan/bungeecord/src/main/java/com/djrapitops/plan/system/listeners/bungee/PlayerOnlineListener.java index d39cd9c8e..e59e35351 100644 --- a/Plan/bungeecord/src/main/java/com/djrapitops/plan/system/listeners/bungee/PlayerOnlineListener.java +++ b/Plan/bungeecord/src/main/java/com/djrapitops/plan/system/listeners/bungee/PlayerOnlineListener.java @@ -78,7 +78,7 @@ public class PlayerOnlineListener implements Listener { InetAddress address = player.getAddress().getAddress(); long time = System.currentTimeMillis(); - sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), time, "", "")); + sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), time, null, null)); boolean gatheringGeolocations = config.isTrue(DataGatheringSettings.GEOLOCATIONS); @@ -114,7 +114,7 @@ public class PlayerOnlineListener implements Listener { long time = System.currentTimeMillis(); // Replaces the current session in the cache. - sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), time, "", "")); + sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), time, null, null)); processing.submit(processors.info().playerPageUpdateProcessor(uuid)); } catch (Exception e) { errorHandler.log(L.WARN, this.getClass(), e); diff --git a/Plan/common/src/main/java/com/djrapitops/plan/data/time/WorldTimes.java b/Plan/common/src/main/java/com/djrapitops/plan/data/time/WorldTimes.java index 1ecc3b809..0424be87e 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/data/time/WorldTimes.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/data/time/WorldTimes.java @@ -55,6 +55,7 @@ public class WorldTimes { } private void addWorld(String worldName, String gameMode, long changeTime) { + if (worldName == null || gameMode == null) return; times.put(worldName, new GMTimes(gameMode, changeTime)); } diff --git a/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/WorldAliasSettings.java b/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/WorldAliasSettings.java index 5206f0f95..866af95c2 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/WorldAliasSettings.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/WorldAliasSettings.java @@ -85,6 +85,8 @@ public class WorldAliasSettings { * @param world World name */ public void addWorld(String world) { + Verify.isFalse(Verify.isEmpty(world), () -> new IllegalArgumentException("Attempted to save a world alias '" + world + "'")); + ConfigNode aliasSect = getAliasSection(); String previousValue = aliasSect.getString(world); @@ -165,7 +167,7 @@ public class WorldAliasSettings { } WorldTimes worldTimes = session.getUnsafe(SessionKeys.WORLD_TIMES); if (!session.supports(SessionKeys.END)) { - return "Current: " + aliases.get(worldTimes.getCurrentWorld()); + return "Current: " + aliases.getOrDefault(worldTimes.getCurrentWorld(), "Unknown"); } Map playtimePerAlias = getPlaytimePerAlias(worldTimes); diff --git a/Plan/common/src/main/resources/bungee.yml b/Plan/common/src/main/resources/bungee.yml index b7b7d42aa..99b1766a3 100644 --- a/Plan/common/src/main/resources/bungee.yml +++ b/Plan/common/src/main/resources/bungee.yml @@ -1,7 +1,7 @@ name: Plan author: Rsl1122 main: com.djrapitops.plan.PlanBungee -version: 4.6.0 +version: 4.6.1 softdepend: - AdvancedBan - LiteBans diff --git a/Plan/common/src/main/resources/bungeeconfig.yml b/Plan/common/src/main/resources/bungeeconfig.yml index 94c35f8ed..d5d2c4385 100644 --- a/Plan/common/src/main/resources/bungeeconfig.yml +++ b/Plan/common/src/main/resources/bungeeconfig.yml @@ -103,6 +103,7 @@ Display_options: # Colors will be determined alphabetically in any case. Order_world_pies_by_percentage: false Players_table: + Show_on_server_page: 2500 Show_on_players_page: 25000 Open_player_links_in_new_tab: false Show_player_IPs: true @@ -138,6 +139,11 @@ Formatting: NoSeconds: 'MMM d YYYY, HH:mm' JustClock: 'HH:mm:ss' # ----------------------------------------------------- +# World aliases can be used to rename worlds and to combine multiple worlds into a group. +# ----------------------------------------------------- +World_aliases: + world: world +# ----------------------------------------------------- # These settings will make Plan write .js, .css, .json and .html files to some location on disk. # Relative path will render to /plugins/Plan/path # Make sure user running the server has write permissions to the path. diff --git a/Plan/common/src/main/resources/plugin.yml b/Plan/common/src/main/resources/plugin.yml index 0eae4b5d8..8b58da689 100644 --- a/Plan/common/src/main/resources/plugin.yml +++ b/Plan/common/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: Plan author: Rsl1122 main: com.djrapitops.plan.Plan -version: 4.6.0 +version: 4.6.1 softdepend: - EssentialsX - Towny diff --git a/Plan/common/src/test/java/com/djrapitops/plan/system/settings/ConfigSettingKeyTest.java b/Plan/common/src/test/java/com/djrapitops/plan/system/settings/ConfigSettingKeyTest.java index df8d05060..37669d7b4 100644 --- a/Plan/common/src/test/java/com/djrapitops/plan/system/settings/ConfigSettingKeyTest.java +++ b/Plan/common/src/test/java/com/djrapitops/plan/system/settings/ConfigSettingKeyTest.java @@ -103,7 +103,6 @@ public class ConfigSettingKeyTest { settings.remove(PluginSettings.SERVER_NAME); settings.remove(PluginSettings.BUNGEE_COPY_CONFIG); settings.remove(DatabaseSettings.TYPE); - settings.remove(DisplaySettings.PLAYERS_PER_SERVER_PAGE); settings.remove(DisplaySettings.GRAPH_TPS_THRESHOLD_MED); settings.remove(DisplaySettings.GRAPH_TPS_THRESHOLD_HIGH); settings.remove(DisplaySettings.GRAPH_DISK_THRESHOLD_MED); diff --git a/Plan/sponge/src/main/java/com/djrapitops/plan/PlanSponge.java b/Plan/sponge/src/main/java/com/djrapitops/plan/PlanSponge.java index 784757c2f..a57ae380e 100644 --- a/Plan/sponge/src/main/java/com/djrapitops/plan/PlanSponge.java +++ b/Plan/sponge/src/main/java/com/djrapitops/plan/PlanSponge.java @@ -42,7 +42,7 @@ import java.io.InputStream; @Plugin( id = "plan", name = "Plan", - version = "4.6.0", + version = "4.6.1", description = "Player Analytics Plugin by Rsl1122", authors = {"Rsl1122"}, dependencies = { diff --git a/Plan/velocity/src/main/java/com/djrapitops/plan/PlanVelocity.java b/Plan/velocity/src/main/java/com/djrapitops/plan/PlanVelocity.java index 0353e5eec..92ca95fed 100644 --- a/Plan/velocity/src/main/java/com/djrapitops/plan/PlanVelocity.java +++ b/Plan/velocity/src/main/java/com/djrapitops/plan/PlanVelocity.java @@ -46,7 +46,7 @@ import java.nio.file.Path; @Plugin( id = "plan", name = "Plan", - version = "4.6.0", + version = "4.6.1", description = "Player Analytics Plugin by Rsl1122", authors = {"Rsl1122"} ) diff --git a/Plan/velocity/src/main/java/com/djrapitops/plan/system/listeners/velocity/PlayerOnlineListener.java b/Plan/velocity/src/main/java/com/djrapitops/plan/system/listeners/velocity/PlayerOnlineListener.java index e96dbf447..9019379bf 100644 --- a/Plan/velocity/src/main/java/com/djrapitops/plan/system/listeners/velocity/PlayerOnlineListener.java +++ b/Plan/velocity/src/main/java/com/djrapitops/plan/system/listeners/velocity/PlayerOnlineListener.java @@ -81,7 +81,7 @@ public class PlayerOnlineListener { InetAddress address = player.getRemoteAddress().getAddress(); long time = System.currentTimeMillis(); - sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), time, "", "")); + sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), time, null, null)); boolean gatheringGeolocations = config.isTrue(DataGatheringSettings.GEOLOCATIONS); @@ -117,7 +117,7 @@ public class PlayerOnlineListener { long now = System.currentTimeMillis(); // Replaces the current session in the cache. - sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), now, "", "")); + sessionCache.cacheSession(uuid, new Session(uuid, serverInfo.getServerUUID(), now, null, null)); processing.submit(processors.info().playerPageUpdateProcessor(uuid)); } catch (Exception e) { errorHandler.log(L.WARN, this.getClass(), e); diff --git a/PlanPluginBridge/pom.xml b/PlanPluginBridge/pom.xml index 9bc276bfa..0065390e3 100644 --- a/PlanPluginBridge/pom.xml +++ b/PlanPluginBridge/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.djrapitops PlanPluginBridge - 4.6.0-1 + 4.6.1 jar ${project.groupId}:${project.artifactId} diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/viaversion/Protocol.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/viaversion/Protocol.java index 6e15eca24..f34b901c6 100644 --- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/viaversion/Protocol.java +++ b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/viaversion/Protocol.java @@ -36,11 +36,10 @@ public class Protocol { */ public static String getMCVersion(int protocolVersion) { switch (protocolVersion) { + case 404: + return "1.13.2"; case 401: return "1.13.1"; - case 390: - case 391: - case 392: case 393: return "1.13"; case 340: @@ -68,7 +67,7 @@ public class Protocol { case 4: return "1.7.5"; default: - return "Unknown (" + protocolVersion + ")"; + return "Newer than 1.13.2 (" + protocolVersion + ")"; } } }