Fix a classloading issue in tests (#8459)
This commit is contained in:
parent
f7c8d79667
commit
b9cf1ac580
2 changed files with 4 additions and 11 deletions
|
@ -694,7 +694,7 @@ index 0000000000000000000000000000000000000000..2fd6c3e65354071af71c7d8ebb97b559
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6679038054796b9bdfeb6fb4b29e50aa63052101
|
||||
index 0000000000000000000000000000000000000000..dbfb8746355be22e11d05cac33d18e04b94aa985
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
@@ -0,0 +1,331 @@
|
||||
|
@ -741,7 +741,6 @@ index 0000000000000000000000000000000000000000..6679038054796b9bdfeb6fb4b29e50aa
|
|||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public final class PaperAdventure {
|
||||
+ public static final AttributeKey<Locale> LOCALE_ATTRIBUTE = AttributeKey.valueOf("adventure:locale");
|
||||
+ private static final Pattern LOCALIZATION_PATTERN = Pattern.compile("%(?:(\\d+)\\$)?s");
|
||||
+ public static final ComponentFlattener FLATTENER = ComponentFlattener.basic().toBuilder()
|
||||
+ .complexMapper(TranslatableComponent.class, (translatable, consumer) -> {
|
||||
|
@ -791,6 +790,7 @@ index 0000000000000000000000000000000000000000..6679038054796b9bdfeb6fb4b29e50aa
|
|||
+ }
|
||||
+ })
|
||||
+ .build();
|
||||
+ 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();
|
||||
+ private static final Codec<CompoundTag, String, IOException, IOException> NBT_CODEC = new Codec<CompoundTag, String, IOException, IOException>() {
|
||||
+ @Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue