Construct PlayerProfiles in the database manager

- New method, DatabaseManager.loadPlayerProfile(String playerName)
 - PlayerProfile no longer has magic numbers that were mapped from two different sets of magic numbers, they have migrated to the DatabaseManagers where they belong
 - Will now be possible to convert SQL -> flatfile, once command is added
This commit is contained in:
riking
2013-06-08 18:56:56 -07:00
parent 98b98256b7
commit 58e8fd4691
14 changed files with 415 additions and 314 deletions

View File

@ -10,7 +10,7 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.runnables.database.SQLConversionTask;
import com.gmail.nossr50.runnables.database.FromFlatfileConversionTask;
import com.gmail.nossr50.util.player.UserManager;
import com.google.common.collect.ImmutableList;
@ -28,7 +28,7 @@ public class MmoupdateCommand implements TabExecutor {
sender.sendMessage(LocaleLoader.getString("Commands.mmoupdate.Start"));
UserManager.saveAll();
UserManager.clearAll();
new SQLConversionTask().runTaskLaterAsynchronously(mcMMO.p, 1);
new FromFlatfileConversionTask().runTaskAsynchronously(mcMMO.p);
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
UserManager.addUser(player);