Enforce sign line nullability when setting line with Adventure Method (#9689)
This commit is contained in:
parent
deb92c2129
commit
0c8e84c20d
1 changed files with 4 additions and 3 deletions
|
@ -3279,10 +3279,10 @@ index bd43440fcbcf461fb8ca94b96cd256f392efeb84..5af30bff1bfdf09daa585071f2ec1fe0
|
|||
Component[] components = new Component[4];
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java b/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
|
||||
index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..1317cdd48c1c27c9e5152da5403237b1bb15ac52 100644
|
||||
index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..4747d77fd5fd12116ef40d897a08c7baca60a399 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
|
||||
@@ -12,37 +12,69 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -12,37 +12,70 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class CraftSignSide implements SignSide {
|
||||
|
||||
// Lazily initialized only if requested:
|
||||
|
@ -3313,6 +3313,7 @@ index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..1317cdd48c1c27c9e5152da5403237b1
|
|||
+
|
||||
+ @Override
|
||||
+ public void line(final int index, final net.kyori.adventure.text.@NotNull Component line) throws IndexOutOfBoundsException {
|
||||
+ com.google.common.base.Preconditions.checkArgument(line != null, "Line cannot be null");
|
||||
+ this.loadLines();
|
||||
+ this.lines.set(index, line);
|
||||
+ }
|
||||
|
@ -3365,7 +3366,7 @@ index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..1317cdd48c1c27c9e5152da5403237b1
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -68,13 +100,16 @@ public class CraftSignSide implements SignSide {
|
||||
@@ -68,13 +101,16 @@ public class CraftSignSide implements SignSide {
|
||||
|
||||
public SignText applyLegacyStringToSignSide() {
|
||||
if (this.lines != null) {
|
||||
|
|
Loading…
Reference in a new issue