Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.plugin.PluginManager Interface Reference
Inheritance diagram for org.bukkit.plugin.PluginManager:
org.bukkit.plugin.SimplePluginManager

Public Member Functions

void registerInterface (Class<?extends PluginLoader > loader) throws IllegalArgumentException
 
Plugin getPlugin (String name)
 
Plugin[] getPlugins ()
 
boolean isPluginEnabled (String name)
 
boolean isPluginEnabled (Plugin plugin)
 
Plugin loadPlugin (File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException
 
Plugin[] loadPlugins (File directory)
 
void disablePlugins ()
 
void clearPlugins ()
 
void callEvent (Event event) throws IllegalStateException
 
void registerEvents (Listener listener, Plugin plugin)
 
void registerEvent (Class<?extends Event > event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin)
 
void registerEvent (Class<?extends Event > event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin, boolean ignoreCancelled)
 
void enablePlugin (Plugin plugin)
 
void disablePlugin (Plugin plugin)
 
Permission getPermission (String name)
 
void addPermission (Permission perm)
 
void removePermission (Permission perm)
 
void removePermission (String name)
 
Set< PermissiongetDefaultPermissions (boolean op)
 
void recalculatePermissionDefaults (Permission perm)
 
void subscribeToPermission (String permission, Permissible permissible)
 
void unsubscribeFromPermission (String permission, Permissible permissible)
 
Set< PermissiblegetPermissionSubscriptions (String permission)
 
void subscribeToDefaultPerms (boolean op, Permissible permissible)
 
void unsubscribeFromDefaultPerms (boolean op, Permissible permissible)
 
Set< PermissiblegetDefaultPermSubscriptions (boolean op)
 
Set< PermissiongetPermissions ()
 
boolean useTimings ()
 

Detailed Description

Handles all plugin management from the Server

Definition at line 15 of file PluginManager.java.

Member Function Documentation

void org.bukkit.plugin.PluginManager.addPermission ( Permission  perm)

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.

Parameters
permPermission to add
Exceptions
IllegalArgumentExceptionThrown when a permission with the same name already exists

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.permissions.Permission.addParent().

void org.bukkit.plugin.PluginManager.callEvent ( Event  event) throws IllegalStateException

Calls an event with the given details

Parameters
eventEvent details
Exceptions
IllegalStateExceptionThrown when an asynchronous event is fired from synchronous code.

Note: This is best-effort basis, and should not be used to test synchronized state. This is an indicator for flawed flow logic.

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(), org.bukkit.plugin.SimpleServicesManager.unregister(), and org.bukkit.plugin.SimpleServicesManager.unregisterAll().

void org.bukkit.plugin.PluginManager.clearPlugins ( )

Disables and removes all plugins

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.disablePlugin ( Plugin  plugin)

Disables the specified plugin

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

Parameters
pluginPlugin to disable
void org.bukkit.plugin.PluginManager.disablePlugins ( )

Disables all the loaded plugins

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.enablePlugin ( Plugin  plugin)

Enables the specified plugin

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

Parameters
pluginPlugin to enable
Set<Permission> org.bukkit.plugin.PluginManager.getDefaultPermissions ( boolean  op)

Gets the default permissions for the given op status

Parameters
opWhich set of default permissions to get
Returns
The default permissions

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.permissions.PermissibleBase.recalculatePermissions().

Set<Permissible> org.bukkit.plugin.PluginManager.getDefaultPermSubscriptions ( boolean  op)

Gets a set containing all subscribed Permissibles to the given default list, by op status

Parameters
opDefault list to query for
Returns
Set containing all subscribed permissions

Implemented in org.bukkit.plugin.SimplePluginManager.

Permission org.bukkit.plugin.PluginManager.getPermission ( String  name)

Gets a Permission from its fully qualified name

Parameters
nameName of the permission
Returns
Permission, or null if none

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.permissions.Permission.addParent(), and org.bukkit.permissions.PermissibleBase.hasPermission().

Set<Permission> org.bukkit.plugin.PluginManager.getPermissions ( )

Gets a set of all registered permissions.

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

Returns
Set containing all current registered permissions

Implemented in org.bukkit.plugin.SimplePluginManager.

Set<Permissible> org.bukkit.plugin.PluginManager.getPermissionSubscriptions ( String  permission)

Gets a set containing all subscribed Permissibles to the given permission, by name

Parameters
permissionPermission to query for
Returns
Set containing all subscribed permissions

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.permissions.Permission.getPermissibles().

Plugin org.bukkit.plugin.PluginManager.getPlugin ( String  name)

Checks if the given plugin is loaded and returns it when applicable

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

Parameters
nameName of the plugin to check
Returns
Plugin if it exists, otherwise null

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.WorldCreator.getGeneratorForName().

Plugin [] org.bukkit.plugin.PluginManager.getPlugins ( )

Gets a list of all currently loaded plugins

Returns
Array of Plugins

Implemented in org.bukkit.plugin.SimplePluginManager.

boolean org.bukkit.plugin.PluginManager.isPluginEnabled ( String  name)

Checks if the given plugin is enabled or not

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

Parameters
nameName of the plugin to check
Returns
true if the plugin is enabled, otherwise false

Implemented in org.bukkit.plugin.SimplePluginManager.

boolean org.bukkit.plugin.PluginManager.isPluginEnabled ( Plugin  plugin)

Checks if the given plugin is enabled or not

Parameters
pluginPlugin to check
Returns
true if the plugin is enabled, otherwise false

Implemented in org.bukkit.plugin.SimplePluginManager.

Plugin org.bukkit.plugin.PluginManager.loadPlugin ( File  file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException

Loads the plugin in the specified file

File must be valid according to the current enabled Plugin interfaces

Parameters
fileFile containing the plugin to load
Returns
The Plugin loaded, or null if it was invalid
Exceptions
InvalidPluginExceptionThrown when the specified file is not a valid plugin
InvalidDescriptionExceptionThrown when the specified file contains an invalid description
UnknownDependencyExceptionIf a required dependency could not be resolved

Implemented in org.bukkit.plugin.SimplePluginManager.

Plugin [] org.bukkit.plugin.PluginManager.loadPlugins ( File  directory)

Loads the plugins contained within the specified directory

Parameters
directoryDirectory to check for plugins
Returns
A list of all plugins loaded

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.recalculatePermissionDefaults ( Permission  perm)

Recalculates the defaults for the given Permission.

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

Parameters
permPermission to recalculate

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.permissions.Permission.recalculatePermissibles().

void org.bukkit.plugin.PluginManager.registerEvent ( Class<?extends Event event,
Listener  listener,
EventPriority  priority,
EventExecutor  executor,
Plugin  plugin 
)

Registers the specified executor to the given event class

Parameters
eventEvent type to register
listenerListener to register
priorityPriority to register this event at
executorEventExecutor to register
pluginPlugin to register

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.registerEvent ( Class<?extends Event event,
Listener  listener,
EventPriority  priority,
EventExecutor  executor,
Plugin  plugin,
boolean  ignoreCancelled 
)

Registers the specified executor to the given event class

Parameters
eventEvent type to register
listenerListener to register
priorityPriority to register this event at
executorEventExecutor to register
pluginPlugin to register
ignoreCancelledWhether to pass cancelled events or not

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.registerEvents ( Listener  listener,
Plugin  plugin 
)

Registers all the events in the given listener class

Parameters
listenerListener to register
pluginPlugin to register

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.registerInterface ( Class<?extends PluginLoader loader) throws IllegalArgumentException

Registers the specified plugin loader

Parameters
loaderClass name of the PluginLoader to register
Exceptions
IllegalArgumentExceptionThrown when the given Class is not a valid PluginLoader

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.removePermission ( Permission  perm)

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 Permissibles that have it.

Parameters
permPermission to remove

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.removePermission ( String  name)

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 Permissibles that have it.

Parameters
namePermission to remove

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.subscribeToDefaultPerms ( boolean  op,
Permissible  permissible 
)

Subscribes to the given Default permissions by operator status

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

Parameters
opDefault list to subscribe to
permissiblePermissible subscribing

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.permissions.PermissibleBase.recalculatePermissions().

void org.bukkit.plugin.PluginManager.subscribeToPermission ( String  permission,
Permissible  permissible 
)

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.

Parameters
permissionPermission to subscribe to
permissiblePermissible subscribing

Implemented in org.bukkit.plugin.SimplePluginManager.

Referenced by org.bukkit.permissions.PermissibleBase.recalculatePermissions().

void org.bukkit.plugin.PluginManager.unsubscribeFromDefaultPerms ( boolean  op,
Permissible  permissible 
)

Unsubscribes from the given Default permissions by operator status

Parameters
opDefault list to unsubscribe from
permissiblePermissible subscribing

Implemented in org.bukkit.plugin.SimplePluginManager.

void org.bukkit.plugin.PluginManager.unsubscribeFromPermission ( String  permission,
Permissible  permissible 
)

Unsubscribes the given Permissible for information about the requested Permission, by name.

Parameters
permissionPermission to unsubscribe from
permissiblePermissible subscribing

Implemented in org.bukkit.plugin.SimplePluginManager.

boolean org.bukkit.plugin.PluginManager.useTimings ( )

Returns whether or not timing code should be used for event calls

Returns
True if event timings are to be used

Implemented in org.bukkit.plugin.SimplePluginManager.


The documentation for this interface was generated from the following file: