-
-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Labels
Description
When admin has @domain/root flag, it is ignored when using RequiresPermissionsOr annotation.
Example
- Admin has only 1 flag (
@css/root) - He is not able to execute css_ban (command implementation bellow), because he does not have
@css/bannor@something/elseflag.
public override void Load(bool hotReload)
{
AddCommand("css_ban", "Ban a player", OnCommand);
}
[RequiresPermissionsOr("@css/ban", "@something/else")]
[CommandHelper(minArgs: 1, usage: "[id]", whoCanExecute: CommandUsage.CLIENT_ONLY)]
public static void OnCommand(CCSPlayerController? caller, CommandInfo info)
{
if (caller == null) return;
info.ReplyToCommand("Hello World!");
}Confirmed on API version: v291 (1.0.291+6349c11)