@@ -171,6 +171,7 @@ public void saveNpcs(boolean force) {
171171 npcConfig .set ("npcs." + data .getId () + ".glowing" , data .isGlowing ());
172172 npcConfig .set ("npcs." + data .getId () + ".glowingColor" , data .getGlowingColor ().toString ());
173173 npcConfig .set ("npcs." + data .getId () + ".turnToPlayer" , data .isTurnToPlayer ());
174+ npcConfig .set ("npcs." + data .getId () + ".turnToPlayerDistance" , data .getTurnToPlayerDistance ());
174175 npcConfig .set ("npcs." + data .getId () + ".messages" , null );
175176 npcConfig .set ("npcs." + data .getId () + ".playerCommands" , null );
176177 npcConfig .set ("npcs." + data .getId () + ".serverCommands" , null );
@@ -302,6 +303,7 @@ public void loadNpcs() {
302303 boolean glowing = npcConfig .getBoolean ("npcs." + id + ".glowing" );
303304 NamedTextColor glowingColor = NamedTextColor .NAMES .value (npcConfig .getString ("npcs." + id + ".glowingColor" , "white" ));
304305 boolean turnToPlayer = npcConfig .getBoolean ("npcs." + id + ".turnToPlayer" );
306+ int turnToPlayerDistance = npcConfig .getInt ("npcs." + id + ".turnToPlayerDistance" , -1 );
305307
306308 Map <ActionTrigger , List <NpcAction .NpcActionData >> actions = new ConcurrentHashMap <>();
307309
@@ -393,8 +395,6 @@ public void loadNpcs() {
393395 }
394396 }
395397
396- int turnToPlayerDistance = (int ) npcConfig .getDouble ("npcs." + id + ".turnToPlayerDistance" , 0 );
397-
398398 NpcData data = new NpcData (
399399 id ,
400400 name ,
0 commit comments