コード例 #1
0
ファイル: Config.cs プロジェクト: RUISMINEX/Heconomy
        public void Create()
        {
            string path = HeconomyAPI.GetAPI().GetPluginFolder();

            if (!File.Exists(path + @"\settings.conf"))
            {
                File.Create(path + @"\settings.conf");
            }
        }
コード例 #2
0
        protected override void OnEnable()
        {
            Plugin = HeconomyAPI.GetAPI();

            Inspector = new Inspector();

            Config = new Config();

            Context.Server.PlayerFactory.PlayerCreated += (sender, args) =>
            {
                Player player = args.Player;

                player.PlayerJoin += new PlayerJoin(Plugin).handle;
            };

            RegisterCommands();

            @Directory.CreateDirectory(Plugin.GetPluginFolder());
            @Directory.CreateDirectory(Plugin.GetPluginFolder() + @"\players");
        }