proper message on permission check failure for commands

This commit is contained in:
KyoZM 2019-10-12 18:20:37 -03:00
parent 36265e5710
commit 5be28178bd

View File

@ -61,8 +61,9 @@ impl ChatCommand {
if !server.entity_is_admin(entity) {
server.clients.notify(
entity,
ServerMsg::private(String::from(
"Unavailable command '/{}'.\nType '/help' for available commands",
ServerMsg::private(format!(
"You don't have permission to use '/{}'.",
self.keyword
)),
);
return;