more variable renames for FPlayer --> UPlayer

This commit is contained in:
Olof Larsson
2013-04-22 19:57:11 +02:00
parent 19f9834210
commit bc194efc9b
15 changed files with 104 additions and 163 deletions

View File

@@ -86,7 +86,7 @@ public class FactionColl extends Coll<Faction>
// INDEX
// -------------------------------------------- //
public void reindexFPlayers()
public void reindexUPlayers()
{
for (Faction faction : this.getAll())
{

View File

@@ -119,7 +119,7 @@ public class FactionColls extends Colls<FactionColl, Faction>
{
for (FactionColl coll : this.getColls())
{
coll.reindexFPlayers();
coll.reindexUPlayers();
}
}

View File

@@ -94,17 +94,17 @@ public class UPlayerColls extends Colls<UPlayerColl, UPlayer>
// Read the file content through GSON.
Type type = new TypeToken<Map<String, UPlayer>>(){}.getType();
Map<String, UPlayer> id2fplayer = Factions.get().gson.fromJson(DiscUtil.readCatch(oldFile), type);
Map<String, UPlayer> id2uplayer = Factions.get().gson.fromJson(DiscUtil.readCatch(oldFile), type);
// The Coll
UPlayerColl coll = this.getForUniverse(MCore.DEFAULT);
// Set the data
for (Entry<String, UPlayer> entry : id2fplayer.entrySet())
for (Entry<String, UPlayer> entry : id2uplayer.entrySet())
{
String playerId = entry.getKey();
UPlayer fplayer = entry.getValue();
coll.attach(fplayer, playerId);
UPlayer uplayer = entry.getValue();
coll.attach(uplayer, playerId);
}
// Mark as migrated