diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 02a648f981..5b334f8dba 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -516,12 +516,13 @@ fn handle_build(server: &mut Server, entity: EcsEntity, _args: String, _action: } } -// TODO: Don't display commands that the player cannot use. fn handle_help(server: &mut Server, entity: EcsEntity, _args: String, _action: &ChatCommand) { for cmd in CHAT_COMMANDS.iter() { - server - .clients - .notify(entity, ServerMsg::private(String::from(cmd.help_string))); + if !cmd.needs_admin || server.entity_is_admin(entity) { + server + .clients + .notify(entity, ServerMsg::private(String::from(cmd.help_string))); + } } }