Fixed a few PlayerData errors

This commit is contained in:
ASangarin 2020-08-01 21:50:25 +02:00
parent f172d52cac
commit 0f09d1e470
2 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,7 @@ public class CombatRunnable extends BukkitRunnable {
@Override
public void run() {
if(!player.isOnline()) { close(); return; }
if (lastHit + MMOCore.plugin.configManager.combatLogTimer < System.currentTimeMillis()) {
Bukkit.getPluginManager().callEvent(new PlayerCombatEvent(player, false));
MMOCore.plugin.configManager.getSimpleMessage("leave-combat").send(player.getPlayer());

View File

@ -72,7 +72,7 @@ public class YAMLPlayerDataManager extends PlayerDataManager {
@Override
public void saveData(PlayerData data) {
ConfigFile file = new ConfigFile(data.getPlayer());
ConfigFile file = new ConfigFile(data.getUniqueId());
FileConfiguration config = file.getConfig();
config.set("class-points", data.getClassPoints());