mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
Fixed potential NullPointerException on server loading
This commit is contained in:
parent
e1dfb08635
commit
2fbc55d0dd
@ -48,7 +48,9 @@ public class HarvesterNPC extends NonPlayerCharacter {
|
|||||||
@Override
|
@Override
|
||||||
public void onDeadCallback() {
|
public void onDeadCallback() {
|
||||||
|
|
||||||
|
if (getFactory() != null && getFactory().getNpcs() != null) {
|
||||||
getFactory().getNpcs().remove(this);
|
getFactory().getNpcs().remove(this);
|
||||||
|
}
|
||||||
|
|
||||||
GameServer.INSTANCE.getEventDispatcher().dispatch(
|
GameServer.INSTANCE.getEventDispatcher().dispatch(
|
||||||
new ObjectDeathEvent(this, ID));
|
new ObjectDeathEvent(this, ID));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user