Rename field from usingAdminMode to overriding

This commit is contained in:
Magnus Ulf 2019-02-01 11:25:49 +01:00
parent 1e20892392
commit 15f03799a9
3 changed files with 25 additions and 4 deletions

View File

@ -62,6 +62,7 @@ import com.massivecraft.factions.entity.migrator.MigratorMConf004Rank;
import com.massivecraft.factions.entity.migrator.MigratorMConf005Warps; import com.massivecraft.factions.entity.migrator.MigratorMConf005Warps;
import com.massivecraft.factions.entity.migrator.MigratorMPerm001Warps; import com.massivecraft.factions.entity.migrator.MigratorMPerm001Warps;
import com.massivecraft.factions.entity.migrator.MigratorMPlayer001Ranks; import com.massivecraft.factions.entity.migrator.MigratorMPlayer001Ranks;
import com.massivecraft.factions.entity.migrator.MigratorMPlayer002UsingAdminMode;
import com.massivecraft.factions.event.EventFactionsChunkChangeType; import com.massivecraft.factions.event.EventFactionsChunkChangeType;
import com.massivecraft.factions.integration.V18.IntegrationV18; import com.massivecraft.factions.integration.V18.IntegrationV18;
import com.massivecraft.factions.integration.V19.IntegrationV19; import com.massivecraft.factions.integration.V19.IntegrationV19;
@ -150,7 +151,8 @@ public class Factions extends MassivePlugin
MigratorMConf004Rank.class, MigratorMConf004Rank.class,
MigratorMConf005Warps.class, MigratorMConf005Warps.class,
MigratorMPerm001Warps.class, MigratorMPerm001Warps.class,
MigratorMPlayer001Ranks.class MigratorMPlayer001Ranks.class,
MigratorMPlayer002UsingAdminMode.class
); );
} }

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.entity; package com.massivecraft.factions.entity;
import com.google.gson.annotations.SerializedName;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.FactionsIndex; import com.massivecraft.factions.FactionsIndex;
import com.massivecraft.factions.FactionsParticipator; import com.massivecraft.factions.FactionsParticipator;
@ -52,7 +51,7 @@ public class MPlayer extends SenderEntity<MPlayer> implements FactionsParticipat
// VERSION // VERSION
// -------------------------------------------- // // -------------------------------------------- //
public int version = 1; public int version = 2;
// -------------------------------------------- // // -------------------------------------------- //
// LOAD // LOAD
@ -168,7 +167,6 @@ public class MPlayer extends SenderEntity<MPlayer> implements FactionsParticipat
// Is this player overriding? // Is this player overriding?
// Null means false // Null means false
@SerializedName(value = "usingAdminMode")
private Boolean overriding = null; private Boolean overriding = null;
// Does this player use titles for territory info? // Does this player use titles for territory info?

View File

@ -0,0 +1,21 @@
package com.massivecraft.factions.entity.migrator;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.store.migrator.MigratorFieldRename;
import com.massivecraft.massivecore.store.migrator.MigratorRoot;
public class MigratorMPlayer002UsingAdminMode extends MigratorRoot
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static MigratorMPlayer002UsingAdminMode i = new MigratorMPlayer002UsingAdminMode();
public static MigratorMPlayer002UsingAdminMode get() { return i; }
private MigratorMPlayer002UsingAdminMode()
{
super(MPlayer.class);
this.addInnerMigrator(MigratorFieldRename.get("usingAdminMode", "overriding"));
}
}