mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 06:05:17 +01:00
Reorder update() method
This commit is contained in:
parent
504a38317c
commit
8ba9d2ceb6
@ -480,8 +480,7 @@ public class CitizensNPC extends AbstractNPC {
|
||||
}
|
||||
}
|
||||
|
||||
navigator.run();
|
||||
if (SUPPORT_GLOWING) {
|
||||
if (SUPPORT_GLOWING && data().has(NPC.Metadata.GLOWING)) {
|
||||
try {
|
||||
getEntity().setGlowing(data().get(NPC.Metadata.GLOWING, false));
|
||||
} catch (NoSuchMethodError e) {
|
||||
@ -489,6 +488,16 @@ public class CitizensNPC extends AbstractNPC {
|
||||
}
|
||||
}
|
||||
|
||||
if (SUPPORT_SILENT && data().has(NPC.Metadata.SILENT)) {
|
||||
try {
|
||||
getEntity().setSilent(Boolean.parseBoolean(data().get(NPC.Metadata.SILENT).toString()));
|
||||
} catch (NoSuchMethodError e) {
|
||||
SUPPORT_SILENT = false;
|
||||
}
|
||||
}
|
||||
|
||||
navigator.run();
|
||||
|
||||
boolean isLiving = getEntity() instanceof LivingEntity;
|
||||
if (isUpdating(NPCUpdate.PACKET)) {
|
||||
if (data().get(NPC.Metadata.KEEP_CHUNK_LOADED, Setting.KEEP_CHUNKS_LOADED.asBoolean())) {
|
||||
@ -527,14 +536,6 @@ public class CitizensNPC extends AbstractNPC {
|
||||
}
|
||||
}
|
||||
|
||||
if (SUPPORT_SILENT && data().has(NPC.Metadata.SILENT)) {
|
||||
try {
|
||||
getEntity().setSilent(Boolean.parseBoolean(data().get(NPC.Metadata.SILENT).toString()));
|
||||
} catch (NoSuchMethodError e) {
|
||||
SUPPORT_SILENT = false;
|
||||
}
|
||||
}
|
||||
|
||||
updateCounter++;
|
||||
} catch (Exception ex) {
|
||||
Throwable error = Throwables.getRootCause(ex);
|
||||
|
Loading…
Reference in New Issue
Block a user