mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-30 22:53:24 +01:00
Fix NPE
This commit is contained in:
parent
5b9cf50b8e
commit
0052596444
@ -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