diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MMOCoreDataSynchronizer.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MMOCoreDataSynchronizer.java index 25ada1d8..84229919 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MMOCoreDataSynchronizer.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MMOCoreDataSynchronizer.java @@ -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."); } } diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java index 90bc9361..7a631b47 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java @@ -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); } diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java index 5f81e45c..1b994b11 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java @@ -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) {