示例#1
0
        void CreateDefaultConfig()
        {
            ConfigObj localConfig = new ConfigObj();

            localConfig.countdown    = 10;
            localConfig.safeDistance = 0;

            localConfig.addMessage("welcome", new List <string>()
            {
                "Welcome to spawn!"
            });
            localConfig.addMessage("countdown", new List <string>()
            {
                "You will teleport to spawn in {0} seconds."
            });
            localConfig.addMessage("spawn", new List <string>()
            {
                "You have teleported to spawn."
            });
            localConfig.addMessage("setSpawn", new List <string>()
            {
                "You have set the server spawn point."
            });
            localConfig.addMessage("noSpawn", new List <string>()
            {
                "You have not set the server spawn point yet.", "Type /setspawn to set a spawn."
            });

            localConfig.addMessage("pendingTeleport", new List <string>()
            {
                "You already have a pending teleport."
            });
            localConfig.addMessage("canceledFromDamage", new List <string>()
            {
                "You've been hit! Your teleport has been canceled."
            });

            localConfig.addMessage("helpSpawn", new List <string>()
            {
                "Use /spawn to teleport to spawn."
            });
            localConfig.addMessage("helpSetSpawn", new List <string>()
            {
                "Use /setspawn to set the server spawn point."
            });

            this.config      = localConfig;
            Config["Config"] = this.config;
            SaveConfig();

            this.SetupConfig();
        }
示例#2
0
        void CreateDefaultConfig()
        {
            ConfigObj localConfig = new ConfigObj();

            localConfig.addMessage(
                "help",
                new List <string>()
            {
                "To create a faction, type \"/faction create <name>\".",
                "To request to join a faction, type \"/faction join <name>\".",
                "To invite, type \"/faction invite <player>\".",
                "To get faction info, type \"/faction info <name>\".",
                "You can also use \"/f\"."
            }
                );
            localConfig.addMessage("created", new List <string>()
            {
                "You have created the \"{0}\" faction."
            });
            localConfig.addMessage("notCreated", new List <string>()
            {
                "The \"{0}\" faction doesn't exists."
            });
            localConfig.addMessage("alreadyCreated", new List <string>()
            {
                "The \"{0}\" faction already exists."
            });
            localConfig.addMessage("alreadyInFaction", new List <string>()
            {
                "You are already a member of a faction."
            });
            localConfig.addMessage("invalidCommand", new List <string>()
            {
                "You ran the \"{0}\" command incorrectly. Type \"/faction help\" to get help"
            });
            localConfig.addMessage("invitationSent", new List <string>()
            {
                "You have invited \"{0}\" to your faction."
            });
            localConfig.addMessage(
                "invitationReceived",
                new List <string>()
            {
                "You have been invited to the \"{0}\" faction.",
                "To accept, type \"/faction join {0}\".",
                "To reject, type \"/faction reject {0}\".",
            }
                );
            localConfig.addMessage("invitationRejected", new List <string>()
            {
                "You have rejected the invitiation from the \"{0}\" faction."
            });
            localConfig.addMessage("requestSent", new List <string>()
            {
                "You have requested to join the \"{0}\" faction."
            });
            localConfig.addMessage(
                "requestReceived",
                new List <string>()
            {
                "\"{0}\" is requesting to join your faction.",
                "Accept with \"/faction accept {0}\".",
                "Deny with \"/faction deny {0}\"."
            }
                );
            localConfig.addMessage("notInFaction", new List <string>()
            {
                "You are not a member of a faction."
            });
            localConfig.addMessage("notOnline", new List <string>()
            {
                "\"{0}\" is either not online, or not a real user."
            });
            localConfig.addMessage("notAcceptee", new List <string>()
            {
                "\"{0}\" has not requested to join your group."
            });
            localConfig.addMessage("membershipGranted", new List <string>()
            {
                "You have been accepted into the \"{0}\" faction."
            });
            localConfig.addMessage("membershipDenied", new List <string>()
            {
                "You have been denied from the \"{0}\" faction."
            });
            localConfig.addMessage("playerAccepted", new List <string>()
            {
                "\"{0}\" has been added to your faction."
            });
            localConfig.addMessage("playerDenied", new List <string>()
            {
                "\"{0}\" has NOT been added to your faction."
            });
            localConfig.addMessage("playerKicked", new List <string>()
            {
                "You have kicked \"{0}\" from your faction."
            });
            localConfig.addMessage("playerKickReceived", new List <string>()
            {
                "You have been kicked from the \"{0}\" faction."
            });
            localConfig.addMessage(
                "factionInfo",
                new List <string>()
            {
                "The \"{0}\" faction:",
                "Owner: {1}",
                "Members: {2}"
            }
                );

            this.config      = localConfig;
            Config["Config"] = this.config;
            SaveConfig();

            this.SetupConfig();
        }