mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 12:14:43 +02:00
Refactor DB code a bit and fix console spam when using the Plan plugin
Fixes #4450
This commit is contained in:
@ -32,7 +32,7 @@ public class FormulaConversionTask extends BukkitRunnable {
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName);
|
||||
|
||||
if (!profile.isLoaded()) {
|
||||
mcMMO.p.debug("Profile not loaded.");
|
||||
|
@ -42,7 +42,13 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(player.getName(), player.getUniqueId(), true);
|
||||
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(player.getUniqueId(), player.getName());
|
||||
|
||||
if(!profile.isLoaded()) {
|
||||
mcMMO.p.getLogger().info("Creating new data for player: "+player.getName());
|
||||
//Profile isn't loaded so add as new user
|
||||
profile = mcMMO.getDatabaseManager().newUser(player);
|
||||
}
|
||||
|
||||
// If successful, schedule the apply
|
||||
if (profile.isLoaded()) {
|
||||
|
Reference in New Issue
Block a user