Using new debug methods

This commit is contained in:
Jules 2023-03-18 23:23:40 +01:00
parent a3166b1049
commit 68fe326035
3 changed files with 10 additions and 9 deletions

View File

@ -4,7 +4,7 @@ import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.sql.DataSynchronizer;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.player.PlayerData;
@ -118,7 +118,7 @@ public class MMOCoreDataSynchronizer extends DataSynchronizer {
}
}
MythicLib.debug("MMOCoreSQL", String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel()));
UtilityMethods.debug(MMOCore.plugin, "SQL", String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel()));
data.setFullyLoaded();
}
@ -138,6 +138,6 @@ public class MMOCoreDataSynchronizer extends DataSynchronizer {
data.getQuestData().updateBossBar();
data.setFullyLoaded();
MythicLib.debug("MMOCoreSQL", "Loaded DEFAULT data for: '" + data.getUniqueId() + "' as no saved data was found.");
UtilityMethods.debug(MMOCore.plugin, "SQL", "Loaded DEFAULT data for: '" + data.getUniqueId() + "' as no saved data was found.");
}
}

View File

@ -1,6 +1,7 @@
package net.Indyuce.mmocore.manager.data.mysql;
import io.lumine.mythic.lib.sql.MMODataSource;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.manager.data.DataProvider;
import net.Indyuce.mmocore.manager.data.GuildDataManager;
import net.Indyuce.mmocore.manager.data.PlayerDataManager;
@ -25,6 +26,8 @@ public class MySQLDataProvider extends MMODataSource implements DataProvider {
"stellium","FLOAT"};
public MySQLDataProvider(FileConfiguration config) {
super(MMOCore.plugin);
this.setup(config);
}

View File

@ -1,18 +1,16 @@
package net.Indyuce.mmocore.manager.data.mysql;
import com.google.gson.JsonObject;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.player.OfflinePlayerData;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.player.profess.PlayerClass;
import net.Indyuce.mmocore.api.player.profess.SavedClassInformation;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import net.Indyuce.mmocore.manager.data.PlayerDataManager;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@ -36,7 +34,7 @@ public class MySQLPlayerDataManager extends PlayerDataManager {
@Override
public void saveData(PlayerData data, boolean logout) {
MythicLib.debug("MMOCoreSQL", "Saving data for: '" + data.getUniqueId() + "'...");
UtilityMethods.debug(MMOCore.plugin, "SQL", "Saving data for: '" + data.getUniqueId() + "'...");
final PlayerDataTableUpdater updater = new PlayerDataTableUpdater(provider, data);
updater.addData("class_points", data.getClassPoints());
@ -73,8 +71,8 @@ public class MySQLPlayerDataManager extends PlayerDataManager {
updater.executeRequest(logout);
MythicLib.debug("MMOCoreSQL", "Saved data for: " + data.getUniqueId());
MythicLib.debug("MMOCoreSQL", String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel()));
UtilityMethods.debug(MMOCore.plugin, "SQL", "Saved data for: " + data.getUniqueId());
UtilityMethods.debug(MMOCore.plugin, "SQL", String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel()));
}
private JsonObject createClassInfoData(PlayerData playerData) {