SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-04-01 09:30:47 +11:00
parent 7cc234d159
commit deee71fef3
2 changed files with 21 additions and 0 deletions

View File

@@ -89,6 +89,15 @@
}
@Override
@@ -135,7 +197,7 @@
if (j != this.page) {
this.page = j;
this.update();
- BlockLectern.a(this.getWorld(), this.getPosition(), this.getBlock());
+ if (this.world != null) BlockLectern.a(this.getWorld(), this.getPosition(), this.getBlock()); // CraftBukkit
}
}
@@ -158,6 +220,32 @@
return itemstack;
}