Add sub-command to /quest which allows for quests to be added/removed from the logger

This commit is contained in:
KingRainbow44 2023-05-01 19:45:32 -04:00
parent 581df066e7
commit b808e7e4ff
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -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);
}
}