Hide admin commands from non-admin players in command list

This commit is contained in:
Jared Miller 2026-02-14 19:12:59 -05:00
parent 1064af87d0
commit fea7430304
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

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