Skip to content

Commit 2dd84ad

Browse files
Make sure sign nbt change was detected in the future version
1 parent d6e43de commit 2dd84ad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@
886886
<dependency>
887887
<groupId>de.tr7zw</groupId>
888888
<artifactId>item-nbt-api-plugin</artifactId>
889-
<version>2.11.2</version>
889+
<version>2.11.3</version>
890890
<scope>provided</scope>
891891
</dependency>
892892
<dependency>

src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,12 +867,14 @@ public void setSignText(@NotNull List<ComponentPackage> lines) {
867867
if (plugin.getGameVersion().ordinal() >= GameVersion.v1_20_R1.ordinal()) {
868868
if (messageNBTList != null) {
869869
messageNBTList.set(i, Util.componentsToJson(lines.get(i).getComponents()));
870+
} else {
871+
throw new IllegalStateException("Sign NBT seems broken!");
870872
}
871873
} else {
872874
tileSign.setString("Text" + (i + 1), Util.componentsToJson(lines.get(i).getComponents()));
873875
}
874876
} catch (Exception e) {
875-
plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, dsiable and fallback... (You can safely ignore this)", e);
877+
plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, disable and fallback... (You can safely ignore this)", e);
876878
plugin.disableNBTAPI();
877879
Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
878880
//Reset it since we disable nbt api, text need to change

0 commit comments

Comments
 (0)