mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 16:16:46 +00:00
Fix connot execute quest command in console
This commit is contained in:
parent
383dfda131
commit
c3ff2b81ec
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user