mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-16 15:46:14 +01:00
Fix NPE
This commit is contained in:
parent
88a46277ca
commit
e3fe46cb0c
@ -81,7 +81,7 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!enabled || npc.getNavigator().isNavigating())
|
||||
if (!enabled || !npc.isSpawned() || npc.getNavigator().isNavigating())
|
||||
return;
|
||||
if (hasInvalidTarget())
|
||||
findNewTarget();
|
||||
|
Loading…
Reference in New Issue
Block a user