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
ConstructorsConstructorDescriptionDataMigration6(File pluginFolder, StoredPropertiesAPI storedProperties) Instantiates a new migration -
Method Summary
Modifier and TypeMethodDescriptionintGets 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 configurationvoidrun(@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:DataMigrationGets an updated configuration given the old configuration- Overrides:
getUpdatedConfigValuesin classDataMigration- Parameters:
oldConfig-The old configuration to update
- Returns:
The update configuration
-
run
Description copied from class:DataMigrationRuns 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:
runin classDataMigration
-
getNewConfigPair
Description copied from class:DataMigrationGets 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:
getNewConfigPairin classDataMigration- Parameters:
oldPair-The old key-value pair
- Returns:
The new and updated key-value pair
-
getVersionFrom
- Specified by:
getVersionFromin classDataMigration- Returns:
The version this migrator is migrating from
-
getVersionTo
- Specified by:
getVersionToin classDataMigration- Returns:
The version this migrator is migrating to
-
getConfigVersion
public int getConfigVersion()Description copied from class:DataMigrationGets the configuration version this modifier will update the configuration to- Specified by:
getConfigVersionin classDataMigration- Returns:
The configuration version of this modifier
-
willPopulateRegistry
public boolean willPopulateRegistry()- Overrides:
willPopulateRegistryin classDataMigration- Returns:
- Whether the manager will add portals / networks to the registry
-