Class DataMigration6
java.lang.Object
org.sgrewritten.stargate.migration.DataMigration
org.sgrewritten.stargate.migration.DataMigration6
The specification for data migration from legacy to 1.0.0.0
-
Constructor Summary
ConstructorDescriptionDataMigration6
(File pluginFolder, StoredPropertiesAPI storedProperties) Instantiates a new migration -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the configuration version this modifier will update the configuration togetNewConfigPair
(TwoTuple<String, Object> oldPair) Gets the new key-value pair corresponding to the old key-value pairgetUpdatedConfigValues
(Map<String, Object> oldConfig) Gets an updated configuration given the old configurationvoid
run
(@NotNull SQLDatabaseAPI database, StargateAPI stargateAPI) Runs this configuration modifierboolean
-
Constructor Details
-
DataMigration6
Instantiates a new migration- Parameters:
pluginFolder
-The folder of the plugin
storedProperties
-Stored properties database
-
-
Method Details
-
getUpdatedConfigValues
Description copied from class:DataMigration
Gets an updated configuration given the old configuration- Overrides:
getUpdatedConfigValues
in classDataMigration
- Parameters:
oldConfig
-The old configuration to update
- Returns:
The update configuration
-
run
Description copied from class:DataMigration
Runs this configuration modifierThis may alter files such as portal and gate files to perform the appropriate changes necessary for compatibility. This does not modify the config file itself.
- Specified by:
run
in classDataMigration
-
getNewConfigPair
Description copied from class:DataMigration
Gets the new key-value pair corresponding to the old key-value pairThis basically gets the updated config key and updates the value if necessary
- Specified by:
getNewConfigPair
in classDataMigration
- Parameters:
oldPair
-The old key-value pair
- Returns:
The new and updated key-value pair
-
getVersionFrom
- Specified by:
getVersionFrom
in classDataMigration
- Returns:
The version this migrator is migrating from
-
getVersionTo
- Specified by:
getVersionTo
in classDataMigration
- Returns:
The version this migrator is migrating to
-
getConfigVersion
public int getConfigVersion()Description copied from class:DataMigration
Gets the configuration version this modifier will update the configuration to- Specified by:
getConfigVersion
in classDataMigration
- Returns:
The configuration version of this modifier
-
willPopulateRegistry
public boolean willPopulateRegistry()- Overrides:
willPopulateRegistry
in classDataMigration
- Returns:
- Whether the manager will add portals / networks to the registry
-