示例#1
0
        private static void Start()
        {
            LoadDependencies();

            foreach (var plugin in Directory.GetFiles(Files.ServerPluginDirectory))
            {
                if (plugin == "Synapse.dll")
                {
                    continue;
                }

                if (plugin.EndsWith(".dll"))
                {
                    LoadPlugin(plugin);
                }
            }

            HarmonyPatch();
            ConfigManager.InitializeConfigs();
            ServerConsole.ReloadServerName();
            _eventHandler = new EventHandlers();
            try
            {
                PermissionReader.Init();
            }
            catch (Exception e)
            {
                Log.Error($"Your Permission in invalid: {e}");
            }

            OnEnable();
            OnReloadCommands();
        }
示例#2
0
        public bool Execute(ArraySegment <string> arguments, ICommandSender sender, out string respone)
        {
            if (!sender.GetPlayer().CheckPermission("sy.reload.permission"))
            {
                respone = "You have no Permission for Reload Permissions";
                return(false);
            }

            PermissionReader.ReloadPermission();
            respone = "Permissions Reloaded!";
            return(true);
        }