public static bool MayUseCommand(Command command, RemoteClient user, Server server) { if (user is ConsoleClient) return true; var groups = server.GetUserGroups(user.Username); foreach (var group in groups) { if (command.AllowedGroups.Contains(group)) return true; } return false; }
public static bool MayUseCommand(Command command, MinecraftClient user, Server server) { if (user is ConsoleClient) { return(true); } var groups = server.GetUserGroups(user.Username); foreach (var group in groups) { if (command.AllowedGroups.Contains(group)) { return(true); } } return(false); }
public static bool MayUseCommand(Command command, RemoteClient user, Server server) { if (user is ConsoleClient) return true; var groups = server.GetUserGroups(user.Username); foreach (var group in groups) { if (command.AllowedGroups.Contains(group)) return true; } return false; }