public void LoadExtension(Type t) { if (!t.IsSubclassOf(typeof(ServerExtensionBase))) { throw new Exception("Not a valid extension!"); } ServerExtensionBase ext = null; ext.Initialize(); _extensions.Add(ext); }
public ExtensionManager(Server server) { _server = server; var baseExtensions = new ServerExtensionBase[] { new Included.BanHammer(server), new Included.ExtensionLoader(server) }; foreach (var ext in baseExtensions) { _extensions.Add(ext); ext.Initialize(); } }