mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-10 14:26:45 +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
|
||||
public void onDeadCallback() {
|
||||
|
||||
getFactory().getNpcs().remove(this);
|
||||
if (getFactory() != null && getFactory().getNpcs() != null) {
|
||||
getFactory().getNpcs().remove(this);
|
||||
}
|
||||
|
||||
GameServer.INSTANCE.getEventDispatcher().dispatch(
|
||||
new ObjectDeathEvent(this, ID));
|
||||
|
Loading…
x
Reference in New Issue
Block a user