Debug for Quests

This commit is contained in:
Ka0rX 2022-10-02 11:37:24 +02:00
parent 7b54c9041d
commit 37220d5a3a
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ public class PlayerQuests implements Closable {
public PlayerQuests(PlayerData playerData) {
this.playerData = playerData;
if (MMOCore.plugin.configManager.questBossBar && playerData.isOnline()) {
if (!MMOCore.plugin.configManager.disableQuestBossBar && playerData.isOnline()) {
bossbarNamespacedKey = new NamespacedKey(MMOCore.plugin, "mmocore_quest_progress_" + playerData.getUniqueId().toString());
bossbar = Bukkit.createBossBar(bossbarNamespacedKey, "", BarColor.PURPLE, BarStyle.SEGMENTED_20);
bossbar.addPlayer(playerData.getPlayer());

View File

@ -226,7 +226,7 @@ public class QuestViewer extends EditableInventory {
if (item.getFunction().equals("quest")) {
String questId = context.getItemStack().getItemMeta().getPersistentDataContainer()
.get(new NamespacedKey(MMOCore.plugin,"quest_id"), PersistentDataType.STRING);
if (questId.equals(""))
if (questId==null||questId.equals(""))
return;
Quest quest = MMOCore.plugin.questManager.get(questId);