mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
fix stupid legacy chat garbage
This commit is contained in:
parent
b856bf08b9
commit
e1763a2679
1 changed files with 13 additions and 1 deletions
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.wrapped = wrapped;
|
||||
+ }
|
||||
+
|
||||
+ IChatBaseComponent deepConverted() {
|
||||
+ public IChatBaseComponent deepConverted() {
|
||||
+ IChatBaseComponent converted = this.converted;
|
||||
+ if (converted == null) {
|
||||
+ converted = PaperAdventure.WRAPPER_AWARE_SERIALIZER.serialize(this.wrapped);
|
||||
|
@ -2901,3 +2901,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Override
|
||||
public String getDisplayName() throws IllegalStateException {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftChatMessage {
|
||||
|
||||
public static String fromComponent(IChatBaseComponent component) {
|
||||
if (component == null) return "";
|
||||
+ if (component instanceof io.papermc.paper.adventure.AdventureComponent) component = ((io.papermc.paper.adventure.AdventureComponent) component).deepConverted();
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
boolean hadFormat = false;
|
||||
|
|
Loading…
Reference in a new issue