From b22c6057a3adc7ab63c33f3f15d8f2aba911b4c2 Mon Sep 17 00:00:00 2001 From: GregF Date: Sun, 17 Mar 2024 08:14:06 +0000 Subject: [PATCH] Changed ::allow_aggro admin command to ::allowaggro true/false for consistency with other commands Added message for ::allowaggro activation Can now check ::allowaggro without toggling it by running it without a trailing true/false --- .../main/core/game/system/command/sets/MiscCommandSet.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt index ef78b83a5..bf9ba822c 100644 --- a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt @@ -553,17 +553,18 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ else -> reject(player, usageStr) } } - define("allow_aggro", Privilege.ADMIN) { player, args -> - val usageStr = "Usage: ::allow_aggro true | false" + define("allowaggro", Privilege.ADMIN, "allowaggro true | false", "Toggle NPCs aggroing on you") { player, args -> + val usageStr = "Usage: ::allowaggro true | false" if(args.size < 2) { - reject(player, usageStr) + notify(player, "Allow admin aggression is currently ${player.getAttribute("/save:allow_admin_aggression", false)}") + return@define } when(args[1]) { "true" -> player.setAttribute("/save:allow_admin_aggression", true) "false" -> player.setAttribute("/save:allow_admin_aggression", false) else -> reject(player, usageStr) - } + notify(player, "Setting aggro ${args[1]}") } define("rules", Privilege.STANDARD, "", "Shows the rules."){ player, _ ->