![]() |
Bukkit
1.4.7-R1.0
|
Handles all plugin management from the Server. More...
Inheritance diagram for org.bukkit.plugin.PluginManager:Public Member Functions | |
| void | registerInterface (Class<?extends PluginLoader > loader) throws IllegalArgumentException |
| Registers the specified plugin loader. | |
| Plugin | getPlugin (String name) |
| Checks if the given plugin is loaded and returns it when applicable. | |
| Plugin[] | getPlugins () |
| Gets a list of all currently loaded plugins. | |
| boolean | isPluginEnabled (String name) |
| Checks if the given plugin is enabled or not. | |
| boolean | isPluginEnabled (Plugin plugin) |
| Checks if the given plugin is enabled or not. | |
| Plugin | loadPlugin (File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException |
| Loads the plugin in the specified file. | |
| Plugin[] | loadPlugins (File directory) |
| Loads the plugins contained within the specified directory. | |
| void | disablePlugins () |
| Disables all the loaded plugins. | |
| void | clearPlugins () |
| Disables and removes all plugins. | |
| void | callEvent (Event event) throws IllegalStateException |
| Calls an event with the given details. | |
| void | registerEvents (Listener listener, Plugin plugin) |
| Registers all the events in the given listener class. | |
| void | registerEvent (Class<?extends Event > event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin) |
| Registers the specified executor to the given event class. | |
| void | registerEvent (Class<?extends Event > event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin, boolean ignoreCancelled) |
| Registers the specified executor to the given event class. | |
| void | enablePlugin (Plugin plugin) |
| Enables the specified plugin. | |
| void | disablePlugin (Plugin plugin) |
| Disables the specified plugin. | |
| Permission | getPermission (String name) |
| Gets a Permission from its fully qualified name. | |
| void | addPermission (Permission perm) |
| Adds a Permission to this plugin manager. | |
| void | removePermission (Permission perm) |
| Removes a Permission registration from this plugin manager. | |
| void | removePermission (String name) |
| Removes a Permission registration from this plugin manager. | |
| Set< Permission > | getDefaultPermissions (boolean op) |
| Gets the default permissions for the given op status. | |
| void | recalculatePermissionDefaults (Permission perm) |
| Recalculates the defaults for the given Permission. | |
| void | subscribeToPermission (String permission, Permissible permissible) |
| Subscribes the given Permissible for information about the requested Permission, by name. | |
| void | unsubscribeFromPermission (String permission, Permissible permissible) |
| Unsubscribes the given Permissible for information about the requested Permission, by name. | |
| Set< Permissible > | getPermissionSubscriptions (String permission) |
| Gets a set containing all subscribed Permissibles to the given permission, by name. | |
| void | subscribeToDefaultPerms (boolean op, Permissible permissible) |
| Subscribes to the given Default permissions by operator status. | |
| void | unsubscribeFromDefaultPerms (boolean op, Permissible permissible) |
| Unsubscribes from the given Default permissions by operator status. | |
| Set< Permissible > | getDefaultPermSubscriptions (boolean op) |
| Gets a set containing all subscribed Permissibles to the given default list, by op status. | |
| Set< Permission > | getPermissions () |
| Gets a set of all registered permissions. | |
| boolean | useTimings () |
| Returns whether or not timing code should be used for event calls. | |
Handles all plugin management from the Server.
Definition at line 15 of file PluginManager.java.
| 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.
| perm | Permission to add |
| IllegalArgumentException | Thrown when a permission with the same name already exists |
Referenced by org.bukkit.permissions.Permission.addParent(), and org.bukkit.util.permissions.DefaultPermissions.registerPermission().
| void org.bukkit.plugin.PluginManager.callEvent | ( | Event | event | ) | throws IllegalStateException |
Calls an event with the given details.
| event | Event details |
| IllegalStateException | Thrown 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. |
Referenced by org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(), org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(), org.bukkit.command.defaults.KillCommand.execute(), org.bukkit.plugin.SimpleServicesManager.unregister(), and org.bukkit.plugin.SimpleServicesManager.unregisterAll().
| void org.bukkit.plugin.PluginManager.clearPlugins | ( | ) |
Disables and removes all plugins.
| 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
| plugin | Plugin to disable |
| void org.bukkit.plugin.PluginManager.disablePlugins | ( | ) |
Disables all the loaded plugins.
| 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
| plugin | Plugin to enable |
| Set<Permission> org.bukkit.plugin.PluginManager.getDefaultPermissions | ( | boolean | op | ) |
Gets the default permissions for the given op status.
| op | Which set of default permissions to get |
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.
| op | Default list to query for |
| Permission org.bukkit.plugin.PluginManager.getPermission | ( | String | name | ) |
Gets a Permission from its fully qualified name.
| name | Name of the permission |
Referenced by org.bukkit.permissions.Permission.addParent(), org.bukkit.permissions.PermissibleBase.hasPermission(), and org.bukkit.util.permissions.DefaultPermissions.registerPermission().
| 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.
| Set<Permissible> org.bukkit.plugin.PluginManager.getPermissionSubscriptions | ( | String | permission | ) |
Gets a set containing all subscribed Permissibles to the given permission, by name.
| permission | Permission to query for |
Referenced by org.bukkit.command.Command.broadcastCommandMessage(), and 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
| name | Name of the plugin to check |
Referenced by org.bukkit.command.defaults.VersionCommand.execute(), and org.bukkit.WorldCreator.getGeneratorForName().
| Plugin [] org.bukkit.plugin.PluginManager.getPlugins | ( | ) |
Gets a list of all currently loaded plugins.
Referenced by org.bukkit.command.defaults.VersionCommand.execute(), org.bukkit.command.defaults.TimingsCommand.execute(), and org.bukkit.command.defaults.VersionCommand.tabComplete().
| 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.
| name | Name of the plugin to check |
| boolean org.bukkit.plugin.PluginManager.isPluginEnabled | ( | Plugin | plugin | ) |
Checks if the given plugin is enabled or not.
| plugin | Plugin to check |
| 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
| file | File containing the plugin to load |
| InvalidPluginException | Thrown when the specified file is not a valid plugin |
| InvalidDescriptionException | Thrown when the specified file contains an invalid description |
| UnknownDependencyException | If a required dependency could not be resolved |
| Plugin [] org.bukkit.plugin.PluginManager.loadPlugins | ( | File | directory | ) |
Loads the plugins contained within the specified directory.
| directory | Directory to check for plugins |
| 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.
| perm | Permission to recalculate |
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.
| event | Event type to register |
| listener | Listener to register |
| priority | Priority to register this event at |
| executor | EventExecutor to register |
| plugin | Plugin to register |
| 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.
| event | Event type to register |
| listener | Listener to register |
| priority | Priority to register this event at |
| executor | EventExecutor to register |
| plugin | Plugin to register |
| ignoreCancelled | Whether to pass cancelled events or not |
Registers all the events in the given listener class.
| listener | Listener to register |
| plugin | Plugin to register |
| void org.bukkit.plugin.PluginManager.registerInterface | ( | Class<?extends PluginLoader > | loader | ) | throws IllegalArgumentException |
Registers the specified plugin loader.
| loader | Class name of the PluginLoader to register |
| IllegalArgumentException | Thrown when the given Class is not a valid PluginLoader |
| 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.
| perm | Permission to remove |
| 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.
| name | Permission to remove |
| 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.
| op | Default list to subscribe to |
| permissible | Permissible subscribing |
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.
| permission | Permission to subscribe to |
| permissible | Permissible subscribing |
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.
| op | Default list to unsubscribe from |
| permissible | Permissible subscribing |
Referenced by org.bukkit.permissions.PermissibleBase.clearPermissions().
| void org.bukkit.plugin.PluginManager.unsubscribeFromPermission | ( | String | permission, |
| Permissible | permissible | ||
| ) |
Unsubscribes the given Permissible for information about the requested Permission, by name.
| permission | Permission to unsubscribe from |
| permissible | Permissible subscribing |
Referenced by org.bukkit.permissions.PermissibleBase.clearPermissions().
| boolean org.bukkit.plugin.PluginManager.useTimings | ( | ) |
Returns whether or not timing code should be used for event calls.
Referenced by org.bukkit.plugin.java.JavaPluginLoader.createRegisteredListeners(), and org.bukkit.command.defaults.TimingsCommand.execute().