mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 16:32:14 +00:00
Fix connot execute quest command in console
This commit is contained in:
parent
3c654cf030
commit
470007a6c0
@ -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