Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.plugin.SimplePluginManager Class Reference

Handles all plugin management from the Server. More...

+ Inheritance diagram for org.bukkit.plugin.SimplePluginManager:
+ Collaboration diagram for org.bukkit.plugin.SimplePluginManager:

Public Member Functions

 SimplePluginManager (Server instance, SimpleCommandMap commandMap)
 
void registerInterface (Class<?extends PluginLoader > loader) throws IllegalArgumentException
 Registers the specified plugin loader.
 
Plugin[] loadPlugins (File directory)
 Loads the plugins contained within the specified directory.
 
synchronized Plugin loadPlugin (File file) throws InvalidPluginException, UnknownDependencyException
 Loads the plugin in the specified file.
 
synchronized Plugin getPlugin (String name)
 Checks if the given plugin is loaded and returns it when applicable.
 
synchronized Plugin[] getPlugins ()
 
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.
 
void enablePlugin (final Plugin plugin)
 
void disablePlugins ()
 
void disablePlugin (final Plugin plugin)
 
void clearPlugins ()
 
void callEvent (Event event)
 Calls an event with the given details.
 
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)
 Registers the given event to the specified listener using a directly passed EventExecutor.
 
Permission getPermission (String name)
 
void addPermission (Permission perm)
 
Set< PermissiongetDefaultPermissions (boolean op)
 
void removePermission (Permission perm)
 
void removePermission (String name)
 
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 ()
 
void useTimings (boolean use)
 Sets whether or not per event timing code should be used.
 
- Public Member Functions inherited from org.bukkit.plugin.PluginManager
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< PermissiongetDefaultPermissions (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< PermissiblegetPermissionSubscriptions (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< PermissiblegetDefaultPermSubscriptions (boolean op)
 Gets a set containing all subscribed Permissibles to the given default list, by op status.
 
Set< PermissiongetPermissions ()
 Gets a set of all registered permissions.
 
boolean useTimings ()
 Returns whether or not timing code should be used for event calls.
 

Detailed Description

Handles all plugin management from the Server.

Definition at line 40 of file SimplePluginManager.java.

Constructor & Destructor Documentation

org.bukkit.plugin.SimplePluginManager.SimplePluginManager ( Server  instance,
SimpleCommandMap  commandMap 
)

Definition at line 53 of file SimplePluginManager.java.

Member Function Documentation

void org.bukkit.plugin.SimplePluginManager.addPermission ( Permission  perm)
void org.bukkit.plugin.SimplePluginManager.callEvent ( Event  event)

Calls an event with the given details.


This method only synchronizes when the event is not asynchronous.

Parameters
eventEvent details

Definition at line 451 of file SimplePluginManager.java.

References org.bukkit.event.Event.getEventName(), org.bukkit.event.Event.isAsynchronous(), and org.bukkit.Server.isPrimaryThread().

void org.bukkit.plugin.SimplePluginManager.clearPlugins ( )
void org.bukkit.plugin.SimplePluginManager.disablePlugins ( )
Set<Permission> org.bukkit.plugin.SimplePluginManager.getDefaultPermissions ( boolean  op)

Definition at line 579 of file SimplePluginManager.java.

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

Definition at line 678 of file SimplePluginManager.java.

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

Definition at line 564 of file SimplePluginManager.java.

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

Definition at line 688 of file SimplePluginManager.java.

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

Definition at line 644 of file SimplePluginManager.java.

synchronized Plugin org.bukkit.plugin.SimplePluginManager.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

Definition at line 336 of file SimplePluginManager.java.

Referenced by org.bukkit.plugin.SimplePluginManager.isPluginEnabled().

synchronized Plugin [] org.bukkit.plugin.SimplePluginManager.getPlugins ( )
boolean org.bukkit.plugin.SimplePluginManager.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

Definition at line 352 of file SimplePluginManager.java.

References org.bukkit.plugin.SimplePluginManager.getPlugin().

boolean org.bukkit.plugin.SimplePluginManager.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

Definition at line 364 of file SimplePluginManager.java.

References org.bukkit.plugin.Plugin.isEnabled().

synchronized Plugin org.bukkit.plugin.SimplePluginManager.loadPlugin ( File  file) throws InvalidPluginException, 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
UnknownDependencyExceptionIf a required dependency could not be found

Definition at line 290 of file SimplePluginManager.java.

References org.bukkit.plugin.Plugin.getDescription(), org.bukkit.plugin.PluginDescriptionFile.getName(), org.bukkit.plugin.Plugin.getName(), and org.bukkit.plugin.PluginLoader.loadPlugin().

Referenced by org.bukkit.plugin.SimplePluginManager.loadPlugins().

Plugin [] org.bukkit.plugin.SimplePluginManager.loadPlugins ( File  directory)
void org.bukkit.plugin.SimplePluginManager.recalculatePermissionDefaults ( Permission  perm)

Definition at line 591 of file SimplePluginManager.java.

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

Definition at line 508 of file SimplePluginManager.java.

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

Registers the given event to the specified listener using a directly passed EventExecutor.

Parameters
eventEvent class to register
listenerPlayerListener to register
priorityPriority of this event
executorEventExecutor to register
pluginPlugin to register
ignoreCancelledDo not call executor if event was already cancelled

Definition at line 522 of file SimplePluginManager.java.

References org.bukkit.plugin.Plugin.isEnabled(), org.bukkit.event.HandlerList.register(), and org.bukkit.plugin.SimplePluginManager.useTimings().

void org.bukkit.plugin.SimplePluginManager.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

Definition at line 67 of file SimplePluginManager.java.

References org.bukkit.plugin.PluginLoader.getPluginFileFilters().

void org.bukkit.plugin.SimplePluginManager.removePermission ( Permission  perm)
void org.bukkit.plugin.SimplePluginManager.removePermission ( String  name)

Definition at line 587 of file SimplePluginManager.java.

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

Definition at line 655 of file SimplePluginManager.java.

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

Definition at line 619 of file SimplePluginManager.java.

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

Definition at line 666 of file SimplePluginManager.java.

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

Definition at line 631 of file SimplePluginManager.java.

boolean org.bukkit.plugin.SimplePluginManager.useTimings ( )
void org.bukkit.plugin.SimplePluginManager.useTimings ( boolean  use)

Sets whether or not per event timing code should be used.

Parameters
useTrue if per event timing code should be used

Definition at line 701 of file SimplePluginManager.java.

References org.bukkit.plugin.SimplePluginManager.useTimings().


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