void AddData(Player player, string[] args, bool rule = true, bool command = false, bool notice = false)
        {
            string playerId = player.Id.ToString();

            if (!hasPermission(player))
            {
                player.SendError(lang.GetMessage("notAllowed", this, playerId));
                return;
            }
            if (args == null || args.Length == 0)
            {
                player.SendError(lang.GetMessage("help", this, playerId));
                return;
            }
            string text = args[0];

            if (rule)
            {
                PopUpData.Rules newRule = new PopUpData.Rules
                {
                    text = text,
                };

                var key = popupData.rules.Count;
                key++;
                popupData.rules.Add(key.ToString(), newRule);
            }
            if (command)
            {
                PopUpData.Commands newCommand = new PopUpData.Commands
                {
                    text = text,
                };

                var key = popupData.commands.Count;
                key++;
                popupData.commands.Add(key.ToString(), newCommand);
            }
            if (notice)
            {
                PopUpData.Notices newNotice = new PopUpData.Notices
                {
                    text = text,
                };

                var key = popupData.notices.Count;
                key++;
                popupData.notices.Add(key.ToString(), newNotice);
            }
            SaveData();
            SendReply(player, lang.GetMessage("dataAdded", this, playerId));
        }
 private void LoadDefaultRuleList()
 {
     foreach (KeyValuePair <string, string> rule in DefaultRuleList)
     {
         PopUpData.Rules newRule = new PopUpData.Rules
         {
             text = rule.Value,
         };
         if (popupData.rules.ContainsKey(rule.Key))
         {
             return;
         }
         else
         {
             popupData.rules.Add(rule.Key, newRule);
         }
     }
     SaveData();
 }