Package org.bukkit.plugin

# Class SimplePluginManager

java.lang.Object
org.bukkit.plugin.SimplePluginManager

All Implemented Interfaces:
  `PluginManager`

@Deprecated(forRemoval=true) public final class SimplePluginManager extends Object implements PluginManager
Deprecated, for removal: This API element is subject to removal in a future version.
Handles all plugin management from the Server

## Constructor Summary

Constructors
Constructor
Description
`SimplePluginManager(@NotNull Server instance, @NotNull SimpleCommandMap commandMap)`
Deprecated, for removal: This API element is subject to removal in a future version.

## Method Summary

Modifier and Type
Method
Description
`void`
`addPermission(@NotNull Permission perm)`
Deprecated, for removal: This API element is subject to removal in a future version.
Adds a `Permission` to this plugin manager.
`void`
`addPermission(@NotNull Permission perm, boolean dirty)`
Deprecated.
`void`
`callEvent(@NotNull Event event)`
Deprecated, for removal: This API element is subject to removal in a future version.
Calls an event with the given details.
`void`
`clearPermissions()`
Deprecated, for removal: This API element is subject to removal in a future version.
`void`
`clearPlugins()`
Deprecated, for removal: This API element is subject to removal in a future version.
Disables and removes all plugins
`void`
`dirtyPermissibles()`
Deprecated.
`void`
`disablePlugin(@NotNull Plugin plugin)`
Deprecated, for removal: This API element is subject to removal in a future version.
Disables the specified plugin
`void`
`disablePlugins()`
Deprecated, for removal: This API element is subject to removal in a future version.
Disables all the loaded plugins
`void`
`disablePlugins(boolean closeClassloaders)`
Deprecated, for removal: This API element is subject to removal in a future version.
Classloader is always closed by upstream now.
`void`
`enablePlugin(@NotNull Plugin plugin)`
Deprecated, for removal: This API element is subject to removal in a future version.
Enables the specified plugin
`@NotNull Set<Permission>`
`getDefaultPermissions(boolean op)`
Deprecated, for removal: This API element is subject to removal in a future version.
Gets the default permissions for the given op status
`@NotNull Set<Permissible>`
`getDefaultPermSubscriptions(boolean op)`
Deprecated, for removal: This API element is subject to removal in a future version.
Gets a set containing all subscribed `Permissible`s to the given default list, by op status
`@Nullable Permission`
`getPermission(@NotNull String name)`
Deprecated, for removal: This API element is subject to removal in a future version.
Gets a `Permission` from its fully qualified name
`@NotNull Set<Permission>`
`getPermissions()`
Deprecated, for removal: This API element is subject to removal in a future version.
Gets a set of all registered permissions.
`@NotNull Set<Permissible>`
`getPermissionSubscriptions(@NotNull String permission)`
Deprecated, for removal: This API element is subject to removal in a future version.
Gets a set containing all subscribed `Permissible`s to the given permission, by name
`@Nullable Plugin`
`getPlugin(@NotNull String name)`
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if the given plugin is loaded and returns it when applicable
`@NotNull Plugin[]`
`getPlugins()`
Deprecated, for removal: This API element is subject to removal in a future version.
Gets a list of all currently loaded plugins
`boolean`
`isPluginEnabled(@NotNull String name)`
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if the given plugin is enabled or not
`boolean`
`isPluginEnabled(@Nullable Plugin plugin)`
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if the given plugin is enabled or not
`boolean`
`isTransitiveDepend(@NotNull PluginDescriptionFile plugin, @NotNull PluginDescriptionFile depend)`
Deprecated, for removal: This API element is subject to removal in a future version.
`@Nullable Plugin`
`loadPlugin(@NotNull File file)`
Deprecated, for removal: This API element is subject to removal in a future version.
Loads the plugin in the specified file
`@NotNull Plugin[]`
`loadPlugins(@NotNull File directory)`
Deprecated, for removal: This API element is subject to removal in a future version.
Loads the plugins contained within the specified directory
`@NotNull Plugin[]`
`loadPlugins(@NotNull File directory, @NotNull List<File> extraPluginJars)`
Deprecated, for removal: This API element is subject to removal in a future version.
`void`
`recalculatePermissionDefaults(@NotNull Permission perm)`
Deprecated, for removal: This API element is subject to removal in a future version.
Recalculates the defaults for the given `Permission`.
`void`
`registerEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin)`
Deprecated, for removal: This API element is subject to removal in a future version.
Registers the specified executor to the given event class
`void`
`registerEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin, boolean ignoreCancelled)`
Deprecated, for removal: This API element is subject to removal in a future version.
Registers the given event to the specified listener using a directly passed EventExecutor
`void`
`registerEvents(@NotNull Listener listener, @NotNull Plugin plugin)`
Deprecated, for removal: This API element is subject to removal in a future version.
Registers all the events in the given listener class
`void`
`registerInterface(@NotNull Class<? extends PluginLoader> loader)`
Deprecated, for removal: This API element is subject to removal in a future version.
Registers the specified plugin loader
`void`
`removePermission(@NotNull String name)`
Deprecated, for removal: This API element is subject to removal in a future version.
Removes a `Permission` registration from this plugin manager.
`void`
`removePermission(@NotNull Permission perm)`
Deprecated, for removal: This API element is subject to removal in a future version.
Removes a `Permission` registration from this plugin manager.
`void`
`subscribeToDefaultPerms(boolean op, @NotNull Permissible permissible)`
Deprecated, for removal: This API element is subject to removal in a future version.
Subscribes to the given Default permissions by operator status
`void`
`subscribeToPermission(@NotNull String permission, @NotNull Permissible permissible)`
Deprecated, for removal: This API element is subject to removal in a future version.
Subscribes the given Permissible for information about the requested Permission, by name.
`void`
`unsubscribeFromDefaultPerms(boolean op, @NotNull Permissible permissible)`
Deprecated, for removal: This API element is subject to removal in a future version.
Unsubscribes from the given Default permissions by operator status
`void`
`unsubscribeFromPermission(@NotNull String permission, @NotNull Permissible permissible)`
Deprecated, for removal: This API element is subject to removal in a future version.
Unsubscribes the given Permissible for information about the requested Permission, by name.
`boolean`
`useTimings()`
Deprecated, for removal: This API element is subject to removal in a future version.
Returns whether or not timing code should be used for event calls
`void`
`useTimings(boolean use)`
Deprecated, for removal: This API element is subject to removal in a future version.
Sets whether or not per event timing code should be used

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

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

### Methods inherited from interface org.bukkit.plugin.PluginManager

`disablePlugin`

## Constructor Details

### SimplePluginManager

public SimplePluginManager(@NotNull @NotNull Server instance, @NotNull @NotNull SimpleCommandMap commandMap)
Deprecated, for removal: This API element is subject to removal in a future version.

## Method Details

### registerInterface

public void registerInterface(@NotNull @NotNull Class<? extends PluginLoader> loader) throws IllegalArgumentException
Deprecated, for removal: This API element is subject to removal in a future version.
Registers the specified plugin loader

Specified by:
  `registerInterface` in interface `PluginManager`
Parameters:
  `loader` - Class name of the PluginLoader to register
Throws:
  `IllegalArgumentException` - Thrown when the given Class is not a valid PluginLoader

### loadPlugins

@NotNull public @NotNull Plugin[] loadPlugins(@NotNull @NotNull File directory)
Deprecated, for removal: This API element is subject to removal in a future version.
Loads the plugins contained within the specified directory

Specified by:
  `loadPlugins` in interface `PluginManager`
Parameters:
  `directory` - Directory to check for plugins
Returns:
  A list of all plugins loaded

### loadPlugins

@NotNull public @NotNull Plugin[] loadPlugins(@NotNull @NotNull File directory, @NotNull @NotNull List<File> extraPluginJars)
Deprecated, for removal: This API element is subject to removal in a future version.

### loadPlugin

@Nullable public @Nullable Plugin loadPlugin(@NotNull @NotNull File file) throws InvalidPluginException, UnknownDependencyException
Deprecated, for removal: This API element is subject to removal in a future version.
Loads the plugin in the specified file

File must be valid according to the current enabled Plugin interfaces

Specified by:
  `loadPlugin` in interface `PluginManager`
Parameters:
  `file` - File containing the plugin to load
Returns:
  The Plugin loaded, or null if it was invalid
Throws:
  `InvalidPluginException` - Thrown when the specified file is not a valid plugin
  `UnknownDependencyException` - If a required dependency could not be found

### getPlugin

@Nullable public @Nullable Plugin getPlugin(@NotNull @NotNull String name)
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if the given plugin is loaded and returns it when applicable

Please note that the name of the plugin is case-sensitive

Specified by:
  `getPlugin` in interface `PluginManager`
Parameters:
  `name` - Name of the plugin to check
Returns:
  Plugin if it exists, otherwise null

### getPlugins

@NotNull public @NotNull Plugin[] getPlugins()
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Gets a list of all currently loaded plugins

Specified by:
  `getPlugins` in interface `PluginManager`
Returns:
  Array of Plugins

### isPluginEnabled

public boolean isPluginEnabled(@NotNull @NotNull String name)
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if the given plugin is enabled or not

Please note that the name of the plugin is case-sensitive.

Specified by:
  `isPluginEnabled` in interface `PluginManager`
Parameters:
  `name` - Name of the plugin to check
Returns:
  true if the plugin is enabled, otherwise false

### isPluginEnabled

public boolean isPluginEnabled(@Nullable @Nullable Plugin plugin)
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if the given plugin is enabled or not

Specified by:
  `isPluginEnabled` in interface `PluginManager`
Parameters:
  `plugin` - Plugin to check
Returns:
  true if the plugin is enabled, otherwise false

### enablePlugin

public void enablePlugin(@NotNull @NotNull Plugin plugin)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Enables the specified plugin

Attempting to enable a plugin that is already enabled will have no effect

Specified by:
  `enablePlugin` in interface `PluginManager`
Parameters:
  `plugin` - Plugin to enable

### disablePlugins

public void disablePlugins()
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Disables all the loaded plugins

Specified by:
  `disablePlugins` in interface `PluginManager`

### disablePlugins

@Deprecated(forRemoval=true) public void disablePlugins(boolean closeClassloaders)
Deprecated, for removal: This API element is subject to removal in a future version.
Classloader is always closed by upstream now.
This method is no longer useful as upstream has made it so plugin classloaders are always closed on disable. Use `disablePlugins()` instead.

Parameters:
  `closeClassloaders` - unused

### disablePlugin

public void disablePlugin(@NotNull @NotNull Plugin plugin)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Disables the specified plugin

Attempting to disable a plugin that is not enabled will have no effect

Specified by:
  `disablePlugin` in interface `PluginManager`
Parameters:
  `plugin` - Plugin to disable

### clearPlugins

public void clearPlugins()
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Disables and removes all plugins

Specified by:
  `clearPlugins` in interface `PluginManager`

### callEvent

public void callEvent(@NotNull @NotNull Event event)
Deprecated, for removal: This API element is subject to removal in a future version.
Calls an event with the given details.

Specified by:
  `callEvent` in interface `PluginManager`
Parameters:
  `event` - Event details

### registerEvents

public void registerEvents(@NotNull @NotNull Listener listener, @NotNull @NotNull Plugin plugin)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Registers all the events in the given listener class

Specified by:
  `registerEvents` in interface `PluginManager`
Parameters:
  `listener` - Listener to register
  `plugin` - Plugin to register

### registerEvent

public void registerEvent(@NotNull @NotNull Class<? extends Event> event, @NotNull @NotNull Listener listener, @NotNull @NotNull EventPriority priority, @NotNull @NotNull EventExecutor executor, @NotNull @NotNull Plugin plugin)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Registers the specified executor to the given event class

Specified by:
  `registerEvent` in interface `PluginManager`
Parameters:
  `event` - Event type to register
  `listener` - Listener to register
  `priority` - Priority to register this event at
  `executor` - EventExecutor to register
  `plugin` - Plugin to register

### registerEvent

public void registerEvent(@NotNull @NotNull Class<? extends Event> event, @NotNull @NotNull Listener listener, @NotNull @NotNull EventPriority priority, @NotNull @NotNull EventExecutor executor, @NotNull @NotNull Plugin plugin, boolean ignoreCancelled)
Deprecated, for removal: This API element is subject to removal in a future version.
Registers the given event to the specified listener using a directly passed EventExecutor

Specified by:
  `registerEvent` in interface `PluginManager`
Parameters:
  `event` - Event class to register
  `listener` - PlayerListener to register
  `priority` - Priority of this event
  `executor` - EventExecutor to register
  `plugin` - Plugin to register
  `ignoreCancelled` - Do not call executor if event was already cancelled

### getPermission

@Nullable public @Nullable Permission getPermission(@NotNull @NotNull String name)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Gets a `Permission` from its fully qualified name

Specified by:
  `getPermission` in interface `PluginManager`
Parameters:
  `name` - Name of the permission
Returns:
  Permission, or null if none

### addPermission

public void addPermission(@NotNull @NotNull Permission perm)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Adds a `Permission` to this plugin manager.

If a permission is already defined with the given name of the new permission, an exception will be thrown.

Specified by:
  `addPermission` in interface `PluginManager`
Parameters:
  `perm` - Permission to add

### addPermission

@Deprecated public void addPermission(@NotNull @NotNull Permission perm, boolean dirty)
Deprecated.

### getDefaultPermissions

@NotNull public @NotNull Set<Permission> getDefaultPermissions(boolean op)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Gets the default permissions for the given op status

Specified by:
  `getDefaultPermissions` in interface `PluginManager`
Parameters:
  `op` - Which set of default permissions to get
Returns:
  The default permissions

### removePermission

public void removePermission(@NotNull @NotNull Permission perm)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Removes a `Permission` registration from this plugin manager.

If the specified permission does not exist in this plugin manager, nothing will happen.

Removing a permission registration will not remove the permission from any `Permissible`s that have it.

Specified by:
  `removePermission` in interface `PluginManager`
Parameters:
  `perm` - Permission to remove

### removePermission

public void removePermission(@NotNull @NotNull String name)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Removes a `Permission` registration from this plugin manager.

If the specified permission does not exist in this plugin manager, nothing will happen.

Removing a permission registration will not remove the permission from any `Permissible`s that have it.

Specified by:
  `removePermission` in interface `PluginManager`
Parameters:
  `name` - Permission to remove

### recalculatePermissionDefaults

public void recalculatePermissionDefaults(@NotNull @NotNull Permission perm)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Recalculates the defaults for the given `Permission`.

This will have no effect if the specified permission is not registered here.

Specified by:
  `recalculatePermissionDefaults` in interface `PluginManager`
Parameters:
  `perm` - Permission to recalculate

### dirtyPermissibles

@Deprecated public void dirtyPermissibles()
Deprecated.

### subscribeToPermission

public void subscribeToPermission(@NotNull @NotNull String permission, @NotNull @NotNull Permissible permissible)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Subscribes the given Permissible for information about the requested Permission, by name.

If the specified Permission changes in any form, the Permissible will be asked to recalculate.

Specified by:
  `subscribeToPermission` in interface `PluginManager`
Parameters:
  `permission` - Permission to subscribe to
  `permissible` - Permissible subscribing

### unsubscribeFromPermission

public void unsubscribeFromPermission(@NotNull @NotNull String permission, @NotNull @NotNull Permissible permissible)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Unsubscribes the given Permissible for information about the requested Permission, by name.

Specified by:
  `unsubscribeFromPermission` in interface `PluginManager`
Parameters:
  `permission` - Permission to unsubscribe from
  `permissible` - Permissible subscribing

### getPermissionSubscriptions

@NotNull public @NotNull Set<Permissible> getPermissionSubscriptions(@NotNull @NotNull String permission)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Gets a set containing all subscribed `Permissible`s to the given permission, by name

Specified by:
  `getPermissionSubscriptions` in interface `PluginManager`
Parameters:
  `permission` - Permission to query for
Returns:
  Set containing all subscribed permissions

### subscribeToDefaultPerms

public void subscribeToDefaultPerms(boolean op, @NotNull @NotNull Permissible permissible)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Subscribes to the given Default permissions by operator status

If the specified defaults change in any form, the Permissible will be asked to recalculate.

Specified by:
  `subscribeToDefaultPerms` in interface `PluginManager`
Parameters:
  `op` - Default list to subscribe to
  `permissible` - Permissible subscribing

### unsubscribeFromDefaultPerms

public void unsubscribeFromDefaultPerms(boolean op, @NotNull @NotNull Permissible permissible)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Unsubscribes from the given Default permissions by operator status

Specified by:
  `unsubscribeFromDefaultPerms` in interface `PluginManager`
Parameters:
  `op` - Default list to unsubscribe from
  `permissible` - Permissible subscribing

### getDefaultPermSubscriptions

@NotNull public @NotNull Set<Permissible> getDefaultPermSubscriptions(boolean op)
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Gets a set containing all subscribed `Permissible`s to the given default list, by op status

Specified by:
  `getDefaultPermSubscriptions` in interface `PluginManager`
Parameters:
  `op` - Default list to query for
Returns:
  Set containing all subscribed permissions

### getPermissions

@NotNull public @NotNull Set<Permission> getPermissions()
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Gets a set of all registered permissions.

This set is a copy and will not be modified live.

Specified by:
  `getPermissions` in interface `PluginManager`
Returns:
  Set containing all current registered permissions

### isTransitiveDepend

public boolean isTransitiveDepend(@NotNull @NotNull PluginDescriptionFile plugin, @NotNull @NotNull PluginDescriptionFile depend)
Deprecated, for removal: This API element is subject to removal in a future version.

### useTimings

public boolean useTimings()
Deprecated, for removal: This API element is subject to removal in a future version.
Description copied from interface: `PluginManager`
Returns whether or not timing code should be used for event calls

Specified by:
  `useTimings` in interface `PluginManager`
Returns:
  True if event timings are to be used

### useTimings

public void useTimings(boolean use)
Deprecated, for removal: This API element is subject to removal in a future version.
Sets whether or not per event timing code should be used

Parameters:
  `use` - True if per event timing code should be used

### clearPermissions

public void clearPermissions()
Deprecated, for removal: This API element is subject to removal in a future version.