mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-24 19:23:01 +08:00
Add sub-command to /quest
which allows for quests to be added/removed from the logger
This commit is contained in:
parent
581df066e7
commit
b808e7e4ff
@ -94,6 +94,16 @@ public final class QuestCommand implements CommandHandler {
|
||||
String.join(", ", dungeons.intStream()
|
||||
.mapToObj(String::valueOf).toList()));
|
||||
}
|
||||
case "debug" -> {
|
||||
var loggedQuests = targetPlayer.getQuestManager().getLoggedQuests();
|
||||
var shouldAdd = !loggedQuests.contains(questId);
|
||||
|
||||
if (shouldAdd) loggedQuests.add(questId);
|
||||
else loggedQuests.removeInt(questId);
|
||||
|
||||
CommandHandler.sendMessage(sender, "Quest %s will %s."
|
||||
.formatted(questId, shouldAdd ? "now be logged" : "no longer be logged"));
|
||||
}
|
||||
default -> this.sendUsageMessage(sender);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user