mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
Using new debug methods
This commit is contained in:
parent
a3166b1049
commit
68fe326035
@ -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.");
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user