From e35e94e87cc17694dd11c2565623c2c96881885a Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Mon, 19 Jun 2023 00:42:29 +0200 Subject: [PATCH] Migrate chat formatting to Paper's text component API (#130) - Also updated the configs to use the interfaces - Also updated the fun component to use a list config - The text component change adds Paper as a requirement for this plugin --- pom.xml | 31 ++-- .../java/buttondevteam/chat/ChatPlayer.java | 20 +-- .../java/buttondevteam/chat/PluginMain.java | 4 +- .../announce/AnnouncerComponent.java | 8 +- .../appendext/AppendTextComponent.java | 6 +- .../chatonly/ChatOnlyComponent.java | 12 +- .../chat/components/flair/FlairComponent.java | 4 +- .../components/formatter/ChatProcessing.java | 124 ++++++------- .../formatter/FormatterComponent.java | 10 +- .../formatter/formatting/ChatFormatter.java | 91 +++++----- .../formatter/formatting/FormatSettings.java | 4 +- .../formatting/MatchProviderBase.java | 4 +- .../chat/components/fun/FunComponent.java | 12 +- .../towncolors/TownColorComponent.java | 6 +- .../chat/components/towny/TownyComponent.java | 20 +-- .../components/formatter/ChatFormatIT.java | 168 +++++++++--------- 16 files changed, 256 insertions(+), 268 deletions(-) diff --git a/pom.xml b/pom.xml index d6bd59d..3db9190 100644 --- a/pom.xml +++ b/pom.xml @@ -100,18 +100,23 @@ Dynmap https://repo.mikeprimm.com + + papermc + https://repo.papermc.io/repository/maven-public/ + - - - org.spigotmc - spigot-api - 1.12.2-R0.1-SNAPSHOT - - - com.github.TBMCPlugins.ChromaCore - Chroma-Core + + + io.papermc.paper + paper-api + 1.20.1-R0.1-SNAPSHOT + provided + + + com.github.TBMCPlugins.ChromaCore + Chroma-Core v2.0.0-SNAPSHOT - + net.essentialsx EssentialsX @@ -141,12 +146,6 @@ provided - - org.spigotmc - spigot - 1.12.2-R0.1-SNAPSHOT - provided -