mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-24 00:15:16 +01:00
Fixed a loading issue
This commit is contained in:
parent
c48b1df43e
commit
f44da7456a
@ -52,6 +52,8 @@ import net.Indyuce.mmocore.listener.SpellCast.SkillCasting;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.mmogroup.mmolib.MMOLib;
|
||||
import net.mmogroup.mmolib.api.player.MMOData;
|
||||
import net.mmogroup.mmolib.api.stat.StatMap;
|
||||
import net.mmogroup.mmolib.version.VersionSound;
|
||||
|
||||
public class PlayerData extends OfflinePlayerData {
|
||||
@ -112,8 +114,8 @@ public class PlayerData extends OfflinePlayerData {
|
||||
private PlayerData() {
|
||||
super(UUID.randomUUID());
|
||||
|
||||
playerStats = new PlayerStats(this);
|
||||
questData = new PlayerQuests(this);
|
||||
playerStats = new PlayerStats(this, new StatMap(new MMOData().setMMOCore(this)));
|
||||
questData = new PlayerQuests(this, null);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -19,6 +19,12 @@ public class PlayerStats {
|
||||
map = MMOData.get(data.getPlayer()).setMMOCore(data).getStatMap();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PlayerStats(PlayerData data, StatMap map) {
|
||||
this.data = data;
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
public PlayerData getData() {
|
||||
return data;
|
||||
}
|
||||
|
@ -31,10 +31,17 @@ public class PlayerQuests {
|
||||
|
||||
public PlayerQuests(PlayerData playerData) {
|
||||
this.playerData = playerData;
|
||||
|
||||
bossbar = MMOLib.plugin.getVersion().getWrapper().createBossBar(new NamespacedKey(MMOCore.plugin, "quest_bar_" + playerData.getUniqueId().toString()), "", BarColor.PURPLE, BarStyle.SEGMENTED_20, new BarFlag[0]);
|
||||
bossbar.addPlayer(playerData.getPlayer());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PlayerQuests(PlayerData playerData, BossBar bar) {
|
||||
this.playerData = playerData;
|
||||
this.bossbar = bar;
|
||||
}
|
||||
|
||||
public PlayerQuests load(ConfigurationSection config) {
|
||||
if (config.contains("current"))
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user