mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
Fix instances where Signs have null lines. Addresses BUKKIT-684
This commit is contained in:
parent
450edc3004
commit
e3ae188ed2
2 changed files with 10 additions and 1 deletions
|
@ -1302,6 +1302,9 @@ public class NetServerHandler extends NetHandler {
|
|||
if (!event.isCancelled()) {
|
||||
for (int l = 0; l < 4; ++l) {
|
||||
tileentitysign1.lines[l] = event.getLine(l);
|
||||
if(tileentitysign1.lines[l] == null) {
|
||||
tileentitysign1.lines[l] = "";
|
||||
}
|
||||
}
|
||||
tileentitysign1.isEditable = false;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,13 @@ public class CraftSign extends CraftBlockState implements Sign {
|
|||
boolean result = super.update(force);
|
||||
|
||||
if (result) {
|
||||
System.arraycopy(lines, 0, sign.lines, 0, lines.length);
|
||||
for(int i = 0; i < 4; i++) {
|
||||
if(lines[i] != null) {
|
||||
sign.lines[i] = lines[i];
|
||||
} else {
|
||||
sign.lines[i] = "";
|
||||
}
|
||||
}
|
||||
sign.update();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue