Hide admin commands from non-admin players in command list
This commit is contained in:
parent
1064af87d0
commit
fea7430304
1 changed files with 3 additions and 0 deletions
|
|
@ -229,6 +229,9 @@ async def cmd_commands(player: Player, args: str) -> None:
|
|||
other: list[CommandDefinition] = []
|
||||
|
||||
for defn in unique_commands:
|
||||
# Hide admin commands from non-admins
|
||||
if defn.admin and not player.is_admin:
|
||||
continue
|
||||
# Check if it's a movement command
|
||||
if defn.name in DIRECTIONS:
|
||||
movement.append(defn)
|
||||
|
|
|
|||
Loading…
Reference in a new issue