From c6144a51ea90288c581150c3c80930e12045dd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Ulf=20J=C3=B8rgensen?= Date: Sun, 17 Dec 2017 14:38:05 +0100 Subject: [PATCH] Fix migrator --- .../massivecraft/factions/entity/MConf.java | 2 +- .../MigratorMConf002CleanInactivity.java | 6 ++--- .../MigratorMConf003CleanInactivity.java | 23 +++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 src/com/massivecraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index ccadf83f..90876d43 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -60,7 +60,7 @@ public class MConf extends Entity // VERSION // -------------------------------------------- // - public int version = 2; + public int version = 3; // -------------------------------------------- // // COMMAND ALIASES diff --git a/src/com/massivecraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java b/src/com/massivecraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java index 4dfa157a..4abae91d 100644 --- a/src/com/massivecraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java +++ b/src/com/massivecraft/factions/entity/migrator/MigratorMConf002CleanInactivity.java @@ -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")); } } diff --git a/src/com/massivecraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java b/src/com/massivecraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java new file mode 100644 index 00000000..a0b8a740 --- /dev/null +++ b/src/com/massivecraft/factions/entity/migrator/MigratorMConf003CleanInactivity.java @@ -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")); + } + +}