Class UpdateDefaultServerFiles
java.lang.Object
me.pauleff.converter.plugins.UpdateDefaultServerFiles
- All Implemented Interfaces:
DefaultPlugin, MOOCPlugin
Rewrites remapped player UUIDs in root server JSON files such as whitelist, bans, and ops.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEnabled(PluginContext ctx) Returnstruewhen an online/offline conversion was requested.metadata()Returns the metadata that identifies and describes this plugin.voidrun(PluginContext ctx, List<Path> resolvedExistingTargets) Replaces original UUIDs with remapped values in each resolved server file.setTargets(PluginContext ctx) Returns the standard server JSON files under the server root that may contain UUIDs.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MOOCPlugin
logger, returnAllFilesInFolders
-
Constructor Details
-
UpdateDefaultServerFiles
public UpdateDefaultServerFiles()
-
-
Method Details
-
metadata
Returns the metadata that identifies and describes this plugin.- Specified by:
metadatain interfaceMOOCPlugin- Returns:
- the plugin metadata
-
isEnabled
Returnstruewhen an online/offline conversion was requested.- Specified by:
isEnabledin interfaceDefaultPlugin- Specified by:
isEnabledin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
trueif this is a conversion operation;falseotherwise
-
setTargets
Returns the standard server JSON files under the server root that may contain UUIDs.- Specified by:
setTargetsin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
- the candidate server file paths; never
null
-
run
Replaces original UUIDs with remapped values in each resolved server file.- Specified by:
runin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion contextresolvedExistingTargets- the existing server files to rewrite- Throws:
IOException- if reading or writing a file fails
-