mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-20 07:01:50 +01:00
Update src/main/java/net/citizensnpcs/npc/CitizensNPC.java
This commit is contained in:
parent
6f8c4a7e58
commit
9fbfaa546d
@ -44,7 +44,6 @@ public abstract class CitizensNPC extends AbstractNPC {
|
|||||||
|
|
||||||
protected CitizensNPC(int id, String name) {
|
protected CitizensNPC(int id, String name) {
|
||||||
super(id, name);
|
super(id, name);
|
||||||
runnables.add(navigator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract EntityLiving createHandle(Location loc);
|
protected abstract EntityLiving createHandle(Location loc);
|
||||||
@ -220,8 +219,10 @@ public abstract class CitizensNPC extends AbstractNPC {
|
|||||||
public void update() {
|
public void update() {
|
||||||
try {
|
try {
|
||||||
super.update();
|
super.update();
|
||||||
if (isSpawned())
|
if (isSpawned()) {
|
||||||
NMS.trySwim(getHandle());
|
NMS.trySwim(getHandle());
|
||||||
|
navigator.run();
|
||||||
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Messaging.logTr(Messages.EXCEPTION_UPDATING_NPC, getId(), ex.getMessage());
|
Messaging.logTr(Messages.EXCEPTION_UPDATING_NPC, getId(), ex.getMessage());
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user