public static bool RegisterCommand(string name, IGunGameCommand command) { if (!commands.ContainsKey(name)) { commands.Add(name, command); return(true); } return(false); }
public static bool HasGGPermissionFor(this IRocketPlayer player, IGunGameCommand command) { return((byte)command.PermissionLevel <= (byte)((UnturnedPlayer)player).GunGamePlayer().pLevel); }
public static bool TryGetCommand(string key, out IGunGameCommand cmd) { return(commands.TryGetValue(key.ToLowerInvariant(), out cmd)); }