mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
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
This commit is contained in:
parent
6e9183ea8f
commit
b22c6057a3
1 changed files with 5 additions and 4 deletions
|
|
@ -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, _ ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue