mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 09:02:09 -07:00
Fix ABI breakage for plainSerializer (#7178)
This commit is contained in:
@@ -390,6 +390,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
+import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
+import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer;
|
||||
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
@@ -418,13 +419,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * <p>Implementations may provide a serializer capable of processing any
|
||||
+ * information that requires access to implementation details.</p>
|
||||
+ *
|
||||
+ * @deprecated will be removed in adventure 5.0.0, use {@link #plainTextSerializer()}
|
||||
+ * @return a serializer to plain text
|
||||
+ */
|
||||
+ public static @NotNull PlainTextComponentSerializer plainSerializer() {
|
||||
+ @Deprecated
|
||||
+ public static @NotNull PlainComponentSerializer plainSerializer() {
|
||||
+ return Bukkit.getUnsafe().plainComponentSerializer();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get a serializer for {@link Component}s that will convert components to
|
||||
+ * a plain-text string.
|
||||
+ *
|
||||
+ * <p>Implementations may provide a serializer capable of processing any
|
||||
+ * information that requires access to implementation details.</p>
|
||||
+ *
|
||||
+ * @return a serializer to plain text
|
||||
+ */
|
||||
+ public static @NotNull PlainTextComponentSerializer plainTextSerializer() {
|
||||
+ return Bukkit.getUnsafe().plainTextSerializer();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get a serializer for {@link Component}s that will convert to and from the
|
||||
+ * standard JSON serialization format using Gson.
|
||||
+ *
|
||||
@@ -1095,7 +1111,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public interface UnsafeValues {
|
||||
+ // Paper start
|
||||
+ net.kyori.adventure.text.flattener.ComponentFlattener componentFlattener();
|
||||
+ net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer plainComponentSerializer();
|
||||
+ net.kyori.adventure.text.serializer.plain.PlainComponentSerializer plainComponentSerializer();
|
||||
+ net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer plainTextSerializer();
|
||||
+ net.kyori.adventure.text.serializer.gson.GsonComponentSerializer gsonComponentSerializer();
|
||||
+ net.kyori.adventure.text.serializer.gson.GsonComponentSerializer colorDownsamplingGsonComponentSerializer();
|
||||
+ net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer legacyComponentSerializer();
|
||||
|
Reference in New Issue
Block a user