PocketMine
PluginManager Class Reference

Public Member Functions

 __construct (Server $server, SimpleCommandMap $commandMap)
 
 getPlugin ($name)
 
 registerInterface ($loaderName)
 
 getPlugins ()
 
 loadPlugin ($path, $loaders=null)
 
 loadPlugins ($directory, $newLoaders=null)
 
 getPermission ($name)
 
 addPermission (Permission $permission)
 
 removePermission ($permission)
 
 getDefaultPermissions ($op)
 
 recalculatePermissionDefaults (Permission $permission)
 
 subscribeToPermission ($permission, Permissible $permissible)
 
 unsubscribeFromPermission ($permission, Permissible $permissible)
 
 subscribeToDefaultPerms ($op, Permissible $permissible)
 
 unsubscribeFromDefaultPerms ($op, Permissible $permissible)
 
 getPermissions ()
 
 isPluginEnabled (Plugin $plugin)
 
 enablePlugin (Plugin $plugin)
 
 disablePlugins ()
 
 disablePlugin (Plugin $plugin)
 
 clearPlugins ()
 
 callEvent (Event $event)
 
 registerEvents (Listener $listener, Plugin $plugin)
 
 registerEvent ($event, Listener $listener, $priority, EventExecutor $executor, Plugin $plugin, $ignoreCancelled=false)
 
 useTimings ()
 
 setUseTimings ($use)
 

Static Public Attributes

static $pluginParentTimer
 
static $useTimings = false
 

Protected Member Functions

 parseYamlCommands (Plugin $plugin)
 

Protected Attributes

 $plugins = []
 
 $permissions = []
 
 $defaultPerms = []
 
 $defaultPermsOp = []
 
 $permSubs = []
 
 $defSubs = []
 
 $defSubsOp = []
 
 $fileAssociations = []
 

Detailed Description

Manages all the plugins, Permissions and Permissibles

Constructor & Destructor Documentation

__construct ( Server  $server,
SimpleCommandMap  $commandMap 
)
Parameters
Server$server
SimpleCommandMap$commandMap

Member Function Documentation

addPermission ( Permission  $permission)
Parameters
Permission$permission
Returns
bool
callEvent ( Event  $event)

Calls an event

Parameters
Event$event
disablePlugin ( Plugin  $plugin)
Parameters
Plugin$plugin
enablePlugin ( Plugin  $plugin)
Parameters
Plugin$plugin
getDefaultPermissions (   $op)
Parameters
boolean$op
Returns
Permission[]
getPermission (   $name)
Parameters
string$name
Returns
null|Permission
getPermissions ( )
Returns
Permission[]
getPlugin (   $name)
Parameters
string$name
Returns
null|Plugin
getPlugins ( )
Returns
Plugin[]
isPluginEnabled ( Plugin  $plugin)
Parameters
Plugin$plugin
Returns
bool
loadPlugin (   $path,
  $loaders = null 
)
Parameters
string$path
PluginLoader[]$loaders
Returns
Plugin
loadPlugins (   $directory,
  $newLoaders = null 
)
Parameters
string$directory
array$newLoaders
Returns
Plugin[]
parseYamlCommands ( Plugin  $plugin)
protected
Parameters
Plugin$plugin
Returns
PluginCommand[]
recalculatePermissionDefaults ( Permission  $permission)
Parameters
Permission$permission
registerEvent (   $event,
Listener  $listener,
  $priority,
EventExecutor  $executor,
Plugin  $plugin,
  $ignoreCancelled = false 
)
Parameters
string$eventClass name that extends Event
Listener$listener
int$priority
EventExecutor$executor
Plugin$plugin
bool$ignoreCancelled
Exceptions
PluginException
registerEvents ( Listener  $listener,
Plugin  $plugin 
)

Registers all the events in the given Listener class

Parameters
Listener$listener
Plugin$plugin
Exceptions
PluginException
registerInterface (   $loaderName)
Parameters
string$loaderNameA PluginLoader class name
Returns
boolean
removePermission (   $permission)
Parameters
string | Permission$permission
setUseTimings (   $use)
Parameters
bool$use
subscribeToDefaultPerms (   $op,
Permissible  $permissible 
)
Parameters
boolean$op
Permissible$permissible
subscribeToPermission (   $permission,
Permissible  $permissible 
)
Parameters
string$permission
Permissible$permissible
unsubscribeFromDefaultPerms (   $op,
Permissible  $permissible 
)
Parameters
boolean$op
Permissible$permissible
unsubscribeFromPermission (   $permission,
Permissible  $permissible 
)
Parameters
string$permission
Permissible$permissible
useTimings ( )
Returns
bool

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