Class DataMigration6

java.lang.Object
org.sgrewritten.stargate.migration.DataMigration
org.sgrewritten.stargate.migration.DataMigration6

public class DataMigration6 extends DataMigration
The specification for data migration from legacy to 1.0.0.0
  • Constructor Details

    • DataMigration6

      public DataMigration6(File pluginFolder, StoredPropertiesAPI storedProperties)
      Instantiates a new migration
      Parameters:
      pluginFolder -

      The folder of the plugin

      storedProperties -

      Stored properties database

  • Method Details

    • getUpdatedConfigValues

      public Map<String,Object> getUpdatedConfigValues(Map<String,Object> oldConfig)
      Description copied from class: DataMigration
      Gets an updated configuration given the old configuration
      Overrides:
      getUpdatedConfigValues in class DataMigration
      Parameters:
      oldConfig -

      The old configuration to update

      Returns:

      The update configuration

    • run

      public void run(@NotNull @NotNull SQLDatabaseAPI database, StargateAPI stargateAPI)
      Description copied from class: DataMigration
      Runs this configuration modifier

      This 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 class DataMigration
    • getNewConfigPair

      protected TwoTuple<String,Object> getNewConfigPair(TwoTuple<String,Object> oldPair)
      Description copied from class: DataMigration
      Gets the new key-value pair corresponding to the old key-value pair

      This basically gets the updated config key and updates the value if necessary

      Specified by:
      getNewConfigPair in class DataMigration
      Parameters:
      oldPair -

      The old key-value pair

      Returns:

      The new and updated key-value pair

    • getVersionFrom

      public String getVersionFrom()
      Specified by:
      getVersionFrom in class DataMigration
      Returns:

      The version this migrator is migrating from

    • getVersionTo

      public String getVersionTo()
      Specified by:
      getVersionTo in class DataMigration
      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 class DataMigration
      Returns:

      The configuration version of this modifier

    • willPopulateRegistry

      public boolean willPopulateRegistry()
      Overrides:
      willPopulateRegistry in class DataMigration
      Returns:
      Whether the manager will add portals / networks to the registry