diff --git a/core/build.gradle b/core/build.gradle index c13cb9eeb..813ab3ddc 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java-library' } -def adventureVersion = "4.12.0" +def adventureVersion = "4.17.0" //tasks.shadowJar.dependsOn ':api:shadowJar' diff --git a/core/src/test/java/com/clubobsidian/dynamicgui/core/test/function/PlayerMiniMessageFunctionTest.java b/core/src/test/java/com/clubobsidian/dynamicgui/core/test/function/PlayerMiniMessageFunctionTest.java index d29420de2..5300a4a9d 100644 --- a/core/src/test/java/com/clubobsidian/dynamicgui/core/test/function/PlayerMiniMessageFunctionTest.java +++ b/core/src/test/java/com/clubobsidian/dynamicgui/core/test/function/PlayerMiniMessageFunctionTest.java @@ -33,7 +33,7 @@ public void nullTest() throws Exception { } @Test - public void dataTest() throws Exception { + public void dataTestPlainText() throws Exception { this.getFactory().inject(); String data = "test"; Function function = new PlayerMiniMessageFunction(); @@ -41,6 +41,19 @@ public void dataTest() throws Exception { MockPlayerWrapper player = this.getFactory().createPlayer(); assertTrue(function.function(player)); assertEquals(1, player.getIncomingChat().size()); - assertEquals("{\"text\":\"test\"}", player.getIncomingChat().get(0)); + assertEquals("\"test\"", player.getIncomingChat().get(0)); + } + + @Test + public void dataTestJsonText() throws Exception { + this.getFactory().inject(); + String data = "test"; + Function function = new PlayerMiniMessageFunction(); + function.setData(data); + MockPlayerWrapper player = this.getFactory().createPlayer(); + assertTrue(function.function(player)); + assertEquals(1, player.getIncomingChat().size()); + System.out.println(player.getIncomingChat()); + assertEquals("{\"color\":\"red\",\"text\":\"test\"}", player.getIncomingChat().get(0)); } }