SPIGOT-5122: Skip world#notify if sign has no world.

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
CraftBukkit/Spigot 2019-06-29 19:54:50 +02:00
parent 020a6a58b2
commit 2667bfc200

View File

@ -107,3 +107,12 @@
}
public EnumColor getColor() {
@@ -126,7 +178,7 @@
if (enumcolor != this.getColor()) {
this.color = enumcolor;
this.update();
- this.world.notify(this.getPosition(), this.getBlock(), this.getBlock(), 3);
+ if (this.world != null) this.world.notify(this.getPosition(), this.getBlock(), this.getBlock(), 3); // CraftBukkit - skip notify if world is null (SPIGOT-5122)
return true;
} else {
return false;