Class ServerFileLoader
- java.lang.Object
-
- com.djrapitops.plan.settings.config.ConfigNode
-
- com.djrapitops.plan.settings.config.Config
-
- com.djrapitops.plan.identification.storage.ServerFileLoader
-
- All Implemented Interfaces:
ServerLoader
@Singleton public class ServerFileLoader extends Config implements ServerLoader
-
-
Field Summary
-
Fields inherited from class com.djrapitops.plan.settings.config.ConfigNode
childNodes, comment, key, nodeOrder, parent, value
-
-
Constructor Summary
Constructors Constructor Description ServerFileLoader(PlanFiles files, PlanConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
java.util.Optional<Server>
load(ServerUUID loaded)
Load the server information.void
prepare()
void
save(Server server)
Save the server information.-
Methods inherited from class com.djrapitops.plan.settings.config.Config
getConfigFilePath, read, save
-
Methods inherited from class com.djrapitops.plan.settings.config.ConfigNode
addChild, addNode, contains, copyAll, copyMissing, getBoolean, getBoolean, getChildren, getComment, getInteger, getInteger, getKey, getLong, getLong, getNode, getNodeDepth, getNodeOrder, getParent, getString, getString, getStringList, getStringList, getStringMap, isLeafNode, moveChild, remove, removeChild, removeNode, reorder, set, set, setComment, sort, toString, updateParent
-
-
-
-
Constructor Detail
-
ServerFileLoader
@Inject public ServerFileLoader(PlanFiles files, PlanConfig config)
-
-
Method Detail
-
prepare
public void prepare() throws java.io.IOException
- Throws:
java.io.IOException
-
load
public java.util.Optional<Server> load(ServerUUID loaded)
Description copied from interface:ServerLoader
Load the server information.- Specified by:
load
in interfaceServerLoader
- Parameters:
loaded
- UUID of the server, null if not known- Returns:
- Optional of the saved information or empty if it has not been stored.
-
save
public void save(Server server)
Description copied from interface:ServerLoader
Save the server information.- Specified by:
save
in interfaceServerLoader
- Parameters:
server
- Information to save.
-
-