From 37220d5a3a4e419ac7fa70720388d7f178fda68c Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Sun, 2 Oct 2022 11:37:24 +0200 Subject: [PATCH] Debug for Quests --- .../main/java/net/Indyuce/mmocore/api/quest/PlayerQuests.java | 2 +- .../src/main/java/net/Indyuce/mmocore/gui/QuestViewer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/PlayerQuests.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/PlayerQuests.java index ee592f40..6acbd3b4 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/PlayerQuests.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/PlayerQuests.java @@ -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()); diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/QuestViewer.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/QuestViewer.java index a0577165..48382b6c 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/QuestViewer.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/QuestViewer.java @@ -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);