From 6f999405403f33b0ec000da968c23842bcd43b3d Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 25 Sep 2020 10:40:26 -0700 Subject: [PATCH] Add missing includes --- Changelog.txt | 1 + pom.xml | 35 +++++++++++++++++++ .../nossr50/util/TextComponentFactory.java | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 10e620817..93b49d8af 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,4 +1,5 @@ Version 2.1.146 + JSON Text components are now done through 'adventure' library by Kyori, this should help reduce player disconnects from messages due to an unfixed Spigot bug. Improvements were made to tracking player placed blocks in mcMMO Players no longer lose levels below the level threshold in hardcore mode Hardcore now only applies penalties to levels above threshold diff --git a/pom.xml b/pom.xml index d1228adbe..fc89690db 100755 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,16 @@ org.apache.tomcat:tomcat-juli org.bstats:bstats-bukkit net.kyori:adventure-api + net.kyori:adventure-text-serializer-gson + net.kyori:adventure-platform-bukkit + net.kyori:adventure-platform-api + net.kyori:adventure-platform-common + net.kyori:adventure-platform-viaversion + net.kyori:adventure-nbt + net.kyori:examination-api + net.kyori:examination-string + net.kyori:adventure-text-serializer-legacy + net.kyori:adventure-text-serializer-bungeecord @@ -115,6 +125,10 @@ org.apache.tomcat com.gmail.nossr50.database.tomcat + + net.kyori.adventure + com.gmail.nossr50.kyori.adventure + org.bstats com.gmail.nossr50.metrics.bstat @@ -160,16 +174,37 @@ + + + net.kyori + adventure-text-serializer-gson + 4.0.0-SNAPSHOT + net.kyori adventure-api 4.0.0-SNAPSHOT + + net.kyori + adventure-nbt + 4.0.0-SNAPSHOT + net.kyori adventure-platform-bukkit 4.0.0-SNAPSHOT + + net.kyori + adventure-platform-api + 4.0.0-SNAPSHOT + + + net.kyori + adventure-platform-common + 4.0.0-SNAPSHOT + org.apache.maven.scm maven-scm-provider-gitexe diff --git a/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java b/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java index 48d016da5..d9f24b675 100644 --- a/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java +++ b/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java @@ -483,7 +483,7 @@ public class TextComponentFactory { int curRank = RankUtils.getRank(player, subSkillType); int nextRank = 0; - if(curRank < subSkillType.getNumRanks() && subSkillType.getNumRanks() > 0) + if(curRank < subSkillType.getNumRanks()) { nextRank = RankUtils.getRankUnlockLevel(subSkillType, curRank+1); }