# PluginServer class

Namespace: [Grasshopper2.Framework](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.framework.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class PluginServer
```

Central repository for all loaded plugins.

## Properties

- [CorePlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/coreplugins.md): (static) Gets an enumerator for all the core component library assemblies. This property iterates over all RHP files inside the plugin components folder, whether or not they were put there by the Grasshopper installer.
- [CustomPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/customplugins.md): (static) Enumerate all custom plugin files.
- [IsLoading](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/isloading.md): (static) Gets whether a plugin is currently in the process of being loaded. The load lock is held for the entire duration of a plugin load, so a lock which cannot be taken right now means another thread is busy loading. Taking the lock the usual way would block until that load completes, so this probes the lock instead of waiting on it. On the loading thread itself the lock is re-entrant and the loading set is consulted directly.
- [LoadState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/loadstate.md): (static) Gets how far the startup sequence has progressed. Plugins loaded after the startup sequence do not affect this, see [PluginServer.PluginLoaded](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/pluginloaded.md) for those.
- [State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/state.md): (static) Gets the current state of the plugin server. The state is immutable and should never be cached, but always retrieved anew.
- [YakPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/yakplugins.md): (static) Enumerate all 3rd party plugin files.

## Methods

- [ComponentAssemblies](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/componentassemblies.md): (static) Enumerate over all plugins that Grasshopper would load if it were asked now to do so. This list is not necessarily consistent with the number of plugins that Grasshopper loaded when it started.
- [DescribeUninstall](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/describeuninstall.md): (static) Describe what uninstalling a plugin would actually do, for putting to the user before it happens. The two kinds of installation carry very different risk. A custom plugin is no more than an entry on a list of files to load, so removing it changes nothing on disk and can be undone by picking the same file again. A Yak package is files, every version of them, and getting them back means downloading them again — assuming the server still has them.
- [FindPluginForObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/findpluginforobject.md): (2 overloads, static) Find which plugin provides the given document object. It is possible that an object is not associated with any plugin.
- [ForgetPlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/forgetplugin.md): (static) Forget a scoped potential plugin.
- [InstallCustomPlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/installcustomplugin.md): (static) Add a custom component assembly. This is typically used only for those plugins which are not installed through regular channels, such as plugins being locally developed or debugged.
- [LoadAllScopedPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/loadallscopedplugins.md): (static) Try and load all scoped plugins.
- [LoadPlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/loadplugin.md): (2 overloads, static) Load a plugin assembly into the framework.
- [RemovePlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/removeplugin.md): (static) Remove a failed plugin from the list.
- [ScopeCustomPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/scopecustomplugins.md): (static) Add all custom selected plugin files to the scoped list.
- [ScopePlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/scopeplugin.md): (static) Scope a potential plugin. This always happens before a plugin is actually loaded.
- [ScopeStandardPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/scopestandardplugins.md): (static) Add all standard plugins to the scoped list.
- [ScopeYakPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/scopeyakplugins.md): (static) Add all yak package installed plugins to the scoped list.
- [UninstallCustomPlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/uninstallcustomplugin.md): (static) Remove a custom component assembly. This is typically used only for those plugins which are not installed through regular channels, such as plugins being locally developed or debugged.
- [UninstallPlugin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/uninstallplugin.md): (static) Uninstall a plugin, whichever way it was installed. A custom plugin is only ever an entry on a list of files to load, so removing the entry is the whole job. A Yak plugin is a package on disk, and getting rid of it means deleting that — which Windows will not do while the assembly is loaded, so whatever will not go now is put on [FleetingPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.fleetingplugins.md)' removal ledger and dealt with at the next startup.

## Events

- [LoadStateChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/loadstatechanged.md): (static) Raised once for each stage of the startup sequence, when it is reached. A late subscriber should check [PluginServer.LoadState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/loadstate.md) first; both the check and the subscription are safe on the UI thread, which is where the stages are reached.
- [PluginFailed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/pluginfailed.md): (static) Raised when a plugin fails to load.
- [PluginForgotten](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/pluginforgotten.md): (static) Raised when a scoped plugin is forgotten during the runtime of Grasshopper.
- [PluginLoaded](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/pluginloaded.md): (static) Raised when a plugin successfully loads.
- [PluginLoading](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/pluginloading.md): (static) Raised just before a plugin starts getting loaded.
- [PluginRemoved](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/pluginremoved.md): (static) Raised when a loaded or failed plugin is removed during the runtime of Grasshopper.
- [PluginScoped](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.pluginserver/pluginscoped.md): (static) Raised when a new plugin is discovered during the runtime of Grasshopper.
