Fix migrator

This commit is contained in:
Magnus Ulf Jørgensen 2017-12-17 14:38:05 +01:00
parent 4904bb39c6
commit c6144a51ea
3 changed files with 27 additions and 4 deletions

View File

@ -60,7 +60,7 @@ public class MConf extends Entity<MConf>
// VERSION
// -------------------------------------------- //
public int version = 2;
public int version = 3;
// -------------------------------------------- //
// COMMAND ALIASES

View File

@ -15,9 +15,9 @@ public class MigratorMConf002CleanInactivity extends MigratorRoot
private MigratorMConf002CleanInactivity()
{
super(MConf.class);
this.addInnerMigrator(MigratorFieldRename.get("removePlayerMillisDefault", "cleanInactivityToleranceMillis"));
this.addInnerMigrator(MigratorFieldRename.get("removePlayerMillisPlayerAgeToBonus", "cleanInactivityToleranceMillisPlayerAgeToBonus"));
this.addInnerMigrator(MigratorFieldRename.get("removePlayerMillisFactionAgeToBonus", "cleanInactivityToleranceMillisFactionAgeToBonus"));
this.addInnerMigrator(MigratorFieldRename.get("removePlayerMillisDefault", "playercleanToleranceMillis"));
this.addInnerMigrator(MigratorFieldRename.get("removePlayerMillisPlayerAgeToBonus", "playercleanToleranceMillisPlayerAgeToBonus"));
this.addInnerMigrator(MigratorFieldRename.get("removePlayerMillisFactionAgeToBonus", "playercleanToleranceMillisFactionAgeToBonus"));
}
}

View File

@ -0,0 +1,23 @@
package com.massivecraft.factions.entity.migrator;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.massivecore.store.migrator.MigratorFieldRename;
import com.massivecraft.massivecore.store.migrator.MigratorRoot;
public class MigratorMConf003CleanInactivity extends MigratorRoot
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MigratorMConf003CleanInactivity i = new MigratorMConf003CleanInactivity();
public static MigratorMConf003CleanInactivity get() { return i; }
private MigratorMConf003CleanInactivity()
{
super(MConf.class);
this.addInnerMigrator(MigratorFieldRename.get("playercleanToleranceMillis", "cleanInactivityToleranceMillis"));
this.addInnerMigrator(MigratorFieldRename.get("playercleanToleranceMillisPlayerAgeToBonus", "cleanInactivityToleranceMillisPlayerAgeToBonus"));
this.addInnerMigrator(MigratorFieldRename.get("playercleanToleranceMillisFactionAgeToBonus", "cleanInactivityToleranceMillisFactionAgeToBonus"));
}
}