Commit 470007a6 authored by zrll_'s avatar zrll_ Committed by Melledy
Browse files

Fix connot execute quest command in console

parent 3c654cf0
......@@ -37,7 +37,7 @@ public final class QuestCommand implements CommandHandler {
switch (cmd) {
case "add" -> {
GameQuest quest = sender.getQuestManager().addQuest(questId);
GameQuest quest = targetPlayer.getQuestManager().addQuest(questId);
if (quest != null) {
CommandHandler.sendMessage(sender, translate(sender, "commands.quest.added", questId));
......@@ -47,7 +47,7 @@ public final class QuestCommand implements CommandHandler {
CommandHandler.sendMessage(sender, translate(sender, "commands.quest.not_found"));
}
case "finish" -> {
GameQuest quest = sender.getQuestManager().getQuestById(questId);
GameQuest quest = targetPlayer.getQuestManager().getQuestById(questId);
if (quest == null) {
CommandHandler.sendMessage(sender, translate(sender, "commands.quest.not_found"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment