fix more compile issues
This commit is contained in:
parent
0dee538a62
commit
a364b7e88b
21 changed files with 34 additions and 40 deletions
|
@ -8,7 +8,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/AdventureComponent.java b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3246049fd557951d971ef40112a411c12aec205c
|
||||
index 0000000000000000000000000000000000000000..fbf7804f8e02fc76cadae661083dbcc5b1c21881
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java
|
||||
@@ -0,0 +1,90 @@
|
||||
|
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..3246049fd557951d971ef40112a411c1
|
|||
+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.network.chat.contents.PlainTextContents;
|
||||
+import net.minecraft.util.FormattedCharSequence;
|
||||
+import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
|
@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..3246049fd557951d971ef40112a411c1
|
|||
+ @Override
|
||||
+ public ComponentContents getContents() {
|
||||
+ if (this.adventure instanceof TextComponent) {
|
||||
+ return new LiteralContents(((TextComponent) this.adventure).content());
|
||||
+ return PlainTextContents.create(((TextComponent) this.adventure).content());
|
||||
+ } else {
|
||||
+ return this.deepConverted().getContents();
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue