Package com.jackdaw.chatwithnpc.npc
Class NPCDataManager
java.lang.Object
com.jackdaw.chatwithnpc.npc.NPCDataManager
A serializer used to read or write the data from the files.
This data is related to the NPC's chat content.
Read or Write the data file with some information, each file just record one relative information.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
theFile
-
npc
-
-
Constructor Details
-
NPCDataManager
NPCDataManager(@NotNull @NotNull NPCEntity npc)
-
-
Method Details
-
mkdir
private static void mkdir() -
isExist
public boolean isExist()Check if the file is existed.- Returns:
- true if the file is existed, otherwise false.
-
sync
public void sync()Synchronize the data from the file to the NPC. -
save
public void save()Save the data from the NPC to the file.
-