mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fn: fix saving and loading of turnToPlayerDistance
This commit is contained in:
@@ -1 +1 @@
|
|||||||
2.4.4.256
|
2.4.4.257
|
||||||
@@ -171,6 +171,7 @@ public class NpcManagerImpl implements NpcManager {
|
|||||||
npcConfig.set("npcs." + data.getId() + ".glowing", data.isGlowing());
|
npcConfig.set("npcs." + data.getId() + ".glowing", data.isGlowing());
|
||||||
npcConfig.set("npcs." + data.getId() + ".glowingColor", data.getGlowingColor().toString());
|
npcConfig.set("npcs." + data.getId() + ".glowingColor", data.getGlowingColor().toString());
|
||||||
npcConfig.set("npcs." + data.getId() + ".turnToPlayer", data.isTurnToPlayer());
|
npcConfig.set("npcs." + data.getId() + ".turnToPlayer", data.isTurnToPlayer());
|
||||||
|
npcConfig.set("npcs." + data.getId() + ".turnToPlayerDistance", data.getTurnToPlayerDistance());
|
||||||
npcConfig.set("npcs." + data.getId() + ".messages", null);
|
npcConfig.set("npcs." + data.getId() + ".messages", null);
|
||||||
npcConfig.set("npcs." + data.getId() + ".playerCommands", null);
|
npcConfig.set("npcs." + data.getId() + ".playerCommands", null);
|
||||||
npcConfig.set("npcs." + data.getId() + ".serverCommands", null);
|
npcConfig.set("npcs." + data.getId() + ".serverCommands", null);
|
||||||
@@ -302,6 +303,7 @@ public class NpcManagerImpl implements NpcManager {
|
|||||||
boolean glowing = npcConfig.getBoolean("npcs." + id + ".glowing");
|
boolean glowing = npcConfig.getBoolean("npcs." + id + ".glowing");
|
||||||
NamedTextColor glowingColor = NamedTextColor.NAMES.value(npcConfig.getString("npcs." + id + ".glowingColor", "white"));
|
NamedTextColor glowingColor = NamedTextColor.NAMES.value(npcConfig.getString("npcs." + id + ".glowingColor", "white"));
|
||||||
boolean turnToPlayer = npcConfig.getBoolean("npcs." + id + ".turnToPlayer");
|
boolean turnToPlayer = npcConfig.getBoolean("npcs." + id + ".turnToPlayer");
|
||||||
|
int turnToPlayerDistance = npcConfig.getInt("npcs." + id + ".turnToPlayerDistance", -1);
|
||||||
|
|
||||||
Map<ActionTrigger, List<NpcAction.NpcActionData>> actions = new ConcurrentHashMap<>();
|
Map<ActionTrigger, List<NpcAction.NpcActionData>> actions = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@@ -393,8 +395,6 @@ public class NpcManagerImpl implements NpcManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int turnToPlayerDistance = (int) npcConfig.getDouble("npcs." + id + ".turnToPlayerDistance", 0);
|
|
||||||
|
|
||||||
NpcData data = new NpcData(
|
NpcData data = new NpcData(
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
|
|||||||
Reference in New Issue
Block a user