DoesPlayerHaveAccessToCommand: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Checks whether a player has access to the given command based on the ACL. | Checks whether a player has access to the given command based on the ACL. | ||
Revision as of 18:30, 27 November 2019
Checks whether a player has access to the given command based on the ACL.
C# Syntax
NAPI.ACL.DoesPlayerHaveAccessToCommand(Client player);
Parameters
- player: parameter input should be in Client type
Example
[Command("logout", ACLRequired = true)]
public void LogoutCommand(Client sender)
{
if (!NAPI.ACL.IsPlayerLoggedIn(sender))
{
sender.SendChatMessage("~r~You are not logged in.");
return;
}
NAPI.ACL.LogoutPlayer(sender);
sender.SendChatMessage("~g~You have been logged out.");
}