mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-24 17:32:52 +08:00
Add triggers list for quest debugging
This commit is contained in:
parent
1c2bdff9dc
commit
d3c7377946
@ -99,11 +99,21 @@ public final class QuestCommand implements CommandHandler {
|
||||
var shouldAdd = !loggedQuests.contains(questId);
|
||||
|
||||
if (shouldAdd) loggedQuests.add(questId);
|
||||
else loggedQuests.removeInt(questId);
|
||||
else loggedQuests.remove(questId);
|
||||
|
||||
CommandHandler.sendMessage(sender, "Quest %s will %s."
|
||||
.formatted(questId, shouldAdd ? "now be logged" : "no longer be logged"));
|
||||
}
|
||||
case "triggers" -> {
|
||||
var quest = targetPlayer.getQuestManager().getQuestById(questId);
|
||||
if (quest == null) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.quest.not_found"));
|
||||
return;
|
||||
}
|
||||
|
||||
CommandHandler.sendMessage(sender, "Triggers registered for %s: %s."
|
||||
.formatted(questId, String.join(", ", quest.getTriggers().keySet())));
|
||||
}
|
||||
default -> this.sendUsageMessage(sender);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user