private void UnblockCommandConsole(ConsoleSystem.Arg arg) { if (arg.Player() != null && !arg.Player().IsAdmin()) { arg.ReplyWith(NoPermission); return; } if (!arg.HasArgs()) { arg.ReplyWith(NoItemSpecified); return; } var item = string.Join(" ", arg.Args); if (item != "*") { if (!Items.Contains(item)) { arg.ReplyWith(string.Format(InvalidItem, item)); return; } if (!BlockedItems.Contains(item)) { arg.ReplyWith(string.Format(UnblockItem, item)); return; } BlockedItems.Remove(item); } else { BlockedItems = new List <string>(); } SetConfigValue("Options", "BlockedItems", BlockedItems); arg.ReplyWith(string.Format(UnblockSucces, item)); }
private void UnblockCommandChat(BasePlayer player, string command, string[] args) { if (!player.IsAdmin) { SendChatMessage(player, NoPermission); return; } if (args.Length == 0) { SendChatMessage(player, NoItemSpecified); return; } var item = string.Join(" ", args); if (item != "*") { if (!Items.Contains(item)) { SendChatMessage(player, InvalidItem, item); return; } if (!BlockedItems.Contains(item)) { SendChatMessage(player, UnblockItem, item); return; } BlockedItems.Remove(item); } else { BlockedItems = new List <string>(); } SetConfigValue("Options", "BlockedItems", BlockedItems); SendChatMessage(player, UnblockSucces, item); }