mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-31 22:30:15 +00:00
Fixed random NPE on startup
This commit is contained in:
parent
ca765c3512
commit
4a9c761707
1 changed files with 6 additions and 4 deletions
|
@ -75,11 +75,13 @@ public class WorldServer extends World {
|
||||||
|
|
||||||
if (block != null) {
|
if (block != null) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
if (world != null) {
|
||||||
BlockPhysicsEvent event = new BlockPhysicsEvent(Event.Type.BLOCK_PHYSICS, world.getBlockAt(i1, j1, k1), l1);
|
BlockPhysicsEvent event = new BlockPhysicsEvent(Event.Type.BLOCK_PHYSICS, world.getBlockAt(i1, j1, k1), l1);
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// CraftBukkit stop
|
// CraftBukkit stop
|
||||||
|
|
||||||
block.b(this, i1, j1, k1, l1);
|
block.b(this, i1, j1, k1, l1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue