work on adventure

This commit is contained in:
Jake Potrebic 2024-04-24 20:14:51 -07:00
parent bb1351cb8d
commit 1444b3632e
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
20 changed files with 288 additions and 155 deletions

View file

@ -206,10 +206,10 @@ index 0000000000000000000000000000000000000000..8f07539a82f449ad217e316a7513a170
+
+}
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
index 0a428c392fec7c088648ab2633c92f0600f404b3..7abf0424be2d61adc4018dd6d6b44fc63e365a3d 100644
index 94a0a5850c97df08019c5b0f5d4e02a9b199949b..91ae74c30e6254a1e6fac5fcadb299653a32cc45 100644
--- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
@@ -27,6 +27,7 @@ import net.kyori.adventure.text.flattener.ComponentFlattener;
@@ -31,6 +31,7 @@ import net.kyori.adventure.text.flattener.ComponentFlattener;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.serializer.ComponentSerializer;
@ -217,14 +217,14 @@ index 0a428c392fec7c088648ab2633c92f0600f404b3..7abf0424be2d61adc4018dd6d6b44fc6
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer;
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
@@ -118,6 +119,7 @@ public final class PaperAdventure {
@@ -125,6 +126,7 @@ public final class PaperAdventure {
public static final AttributeKey<Locale> LOCALE_ATTRIBUTE = AttributeKey.valueOf("adventure:locale"); // init after FLATTENER because classloading triggered here might create a logger
@Deprecated
public static final PlainComponentSerializer PLAIN = PlainComponentSerializer.builder().flattener(FLATTENER).build();
+ public static final ANSIComponentSerializer ANSI_SERIALIZER = ANSIComponentSerializer.builder().flattener(FLATTENER).build();
static final Codec<CompoundTag, String, IOException, IOException> NBT_CODEC = new Codec<CompoundTag, String, IOException, IOException>() {
public static final Codec<Tag, String, CommandSyntaxException, RuntimeException> NBT_CODEC = new Codec<>() {
@Override
public @NotNull CompoundTag decode(final @NotNull String encoded) throws IOException {
public @NotNull Tag decode(final @NotNull String encoded) throws CommandSyntaxException {
diff --git a/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java
index 8323f135d6bf2e1f12525e05094ffa3f2420e7e1..a143ea1e58464a3122fbd8ccafe417bdb3c31c78 100644
--- a/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java