diff --git a/core/src/main/java/me/pikamug/quests/commands/quest/BukkitQuestCommandHandler.java b/core/src/main/java/me/pikamug/quests/commands/quest/BukkitQuestCommandHandler.java index 895c9a20e..cc7373722 100644 --- a/core/src/main/java/me/pikamug/quests/commands/quest/BukkitQuestCommandHandler.java +++ b/core/src/main/java/me/pikamug/quests/commands/quest/BukkitQuestCommandHandler.java @@ -44,22 +44,28 @@ public class BukkitQuestCommandHandler { final Player player = (Player) cs; final Quester quester = plugin.getQuester(player.getUniqueId()); if (!quester.getCurrentQuests().isEmpty()) { + final int[] ticks = {1}; for (final Quest q : quester.getCurrentQuests().keySet()) { final Stage stage = quester.getCurrentStage(q); q.updateCompass(quester, stage); - if (plugin.getQuester(player.getUniqueId()).getQuestProgressOrDefault(q).getDelayStartTime() == 0 - || plugin.getQuester(player.getUniqueId()).getStageTime(q) < 0L) { + if (quester.getQuestProgressOrDefault(q).getDelayStartTime() == 0 + || quester.getStageTime(q) < 0L) { final String msg = BukkitLang.get(player, "questObjectivesTitle") .replace("", q.getName()); - BukkitLang.send(player, ChatColor.GOLD + msg); - quester.showCurrentObjectives(q, quester, false); + plugin.getServer().getScheduler().runTaskLater(plugin, () -> { + BukkitLang.send(player, ChatColor.GOLD + msg); + quester.showCurrentObjectives(q, quester, false); + ticks[0]++; + }, ticks[0]); } else { - final long time = plugin.getQuester(player.getUniqueId()).getStageTime(q); - String msg = ChatColor.YELLOW + "(" + BukkitLang.get(player, "delay") + ") " + ChatColor.RED - + BukkitLang.get(player, "plnTooEarly"); - msg = msg.replace("", q.getName()); - msg = msg.replace("