More compilation error fixes

This commit is contained in:
Nassim Jahnke
2022-06-08 16:24:55 +02:00
parent 0da6d1d498
commit 3cd8d0c681
7 changed files with 27 additions and 13 deletions

View File

@@ -41,8 +41,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import net.kyori.adventure.text.TextComponent;
+import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
+import net.minecraft.network.chat.ComponentContents;
+import net.minecraft.network.chat.MutableComponent;
+import net.minecraft.network.chat.Style;
+import net.minecraft.network.chat.contents.LiteralContents;
+import net.minecraft.util.FormattedCharSequence;
+import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
+import org.jetbrains.annotations.Nullable;
@@ -74,9 +76,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ @Override
+ public String getContents() {
+ public ComponentContents getContents() {
+ if (this.adventure instanceof TextComponent) {
+ return ((TextComponent) this.adventure).content();
+ return new LiteralContents(((TextComponent) this.adventure).content());
+ } else {
+ return this.deepConverted().getContents();
+ }