Package net.md_5.bungee.api.plugin

# Class Plugin

java.lang.Object
net.md_5.bungee.api.plugin.Plugin

public class Plugin extends Object
Represents any Plugin that may be loaded at runtime to enhance existing functionality.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  ``
  `Plugin()`
  `protected`
  `Plugin(ProxyServer proxy, PluginDescription description)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final File`
  `getDataFolder()`
  Gets the data folder where this plugin may store arbitrary data.
  `PluginDescription`
  `getDescription()`
  `ExecutorService`
  `getExecutorService()`
  Deprecated.
  internal API.
  `File`
  `getFile()`
  `Logger`
  `getLogger()`
  `ProxyServer`
  `getProxy()`
  `final InputStream`
  `getResourceAsStream(String name)`
  Get a resource from within this plugins jar or container.
  `void`
  `onDisable()`
  Called when this plugin is disabled.
  `void`
  `onEnable()`
  Called when this plugin is enabled.
  `void`
  `onLoad()`
  Called when the plugin has just been loaded.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Plugin

    public Plugin()

  - ### Plugin

    protected Plugin(ProxyServer proxy, PluginDescription description)

- ## Method Details

  - ### onLoad

    public void onLoad()
    Called when the plugin has just been loaded. Most of the proxy will not be initialized, so only use it for registering `ConfigurationAdapter`'s and other predefined behavior.

  - ### onEnable

    public void onEnable()
    Called when this plugin is enabled.

  - ### onDisable

    public void onDisable()
    Called when this plugin is disabled.

  - ### getDataFolder

    public final File getDataFolder()
    Gets the data folder where this plugin may store arbitrary data. It will be a child of `ProxyServer.getPluginsFolder()`.
    Returns:
      the data folder of this plugin

  - ### getResourceAsStream

    public final InputStream getResourceAsStream(String name)
    Get a resource from within this plugins jar or container. Care must be taken to close the returned stream.
    Parameters:
      `name` - the full path name of this resource
    Returns:
      the stream for getting this resource, or null if it does not exist

  - ### getExecutorService

    @Deprecated @Internal public ExecutorService getExecutorService()
    Deprecated.
    internal API. Use `ProxyServer.getScheduler()` instead
    Returns the executor service associated with this plugin.
    Returns:
      the executor service for this plugin

  - ### getDescription

    public PluginDescription getDescription()

  - ### getProxy

    public ProxyServer getProxy()

  - ### getFile

    public File getFile()

  - ### getLogger

    public Logger getLogger()