PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\plugin\PluginManager Class Reference
+ Collaboration diagram for pocketmine\plugin\PluginManager:

Public Member Functions

 __construct (private Server $server, private ?string $pluginDataDirectory, private ?PluginGraylist $graylist=null)
 
 clearPlugins ()
 
 disablePlugin (Plugin $plugin)
 
 disablePlugins ()
 
 enablePlugin (Plugin $plugin)
 
 getPlugin (string $name)
 
 getPlugins ()
 
 isPluginEnabled (Plugin $plugin)
 
 loadPlugins (string $path, int &$loadErrorCount=0)
 
 registerEvent (string $event, \Closure $handler, int $priority, Plugin $plugin, bool $handleCancelled=false)
 
 registerEvents (Listener $listener, Plugin $plugin)
 
 registerInterface (PluginLoader $loader)
 
 tickSchedulers (int $currentTick)
 

Protected Attributes

array $enabledPlugins = []
 
array $fileAssociations = []
 
array $plugins = []
 

Detailed Description

Manages all the plugins

Definition at line 71 of file PluginManager.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\plugin\PluginManager::__construct ( private Server $server,
private ?string $pluginDataDirectory,
private ?PluginGraylist $graylist = null )

Definition at line 95 of file PluginManager.php.

Member Function Documentation

◆ clearPlugins()

pocketmine\plugin\PluginManager::clearPlugins ( )

Definition at line 545 of file PluginManager.php.

◆ disablePlugin()

pocketmine\plugin\PluginManager::disablePlugin ( Plugin $plugin)

Definition at line 513 of file PluginManager.php.

◆ disablePlugins()

pocketmine\plugin\PluginManager::disablePlugins ( )

Definition at line 496 of file PluginManager.php.

◆ enablePlugin()

pocketmine\plugin\PluginManager::enablePlugin ( Plugin $plugin)

Definition at line 455 of file PluginManager.php.

◆ getPlugin()

pocketmine\plugin\PluginManager::getPlugin ( string $name)

Definition at line 109 of file PluginManager.php.

◆ getPlugins()

pocketmine\plugin\PluginManager::getPlugins ( )
Returns
Plugin[] @phpstan-return array<string, Plugin>

Definition at line 125 of file PluginManager.php.

◆ isPluginEnabled()

pocketmine\plugin\PluginManager::isPluginEnabled ( Plugin $plugin)

Definition at line 451 of file PluginManager.php.

◆ loadPlugins()

pocketmine\plugin\PluginManager::loadPlugins ( string $path,
int & $loadErrorCount = 0 )
Returns
Plugin[]

Definition at line 353 of file PluginManager.php.

◆ registerEvent()

pocketmine\plugin\PluginManager::registerEvent ( string $event,
\Closure $handler,
int $priority,
Plugin $plugin,
bool $handleCancelled = false )
Parameters
string$eventClass name that extends Event

@phpstan-template TEvent of Event @phpstan-param class-string<TEvent> $event @phpstan-param \Closure(TEvent) : void $handler

Exceptions

ReflectionException

Definition at line 653 of file PluginManager.php.

◆ registerEvents()

pocketmine\plugin\PluginManager::registerEvents ( Listener $listener,
Plugin $plugin )

Registers all the events in the given Listener class

Exceptions
PluginException

Definition at line 598 of file PluginManager.php.

◆ registerInterface()

pocketmine\plugin\PluginManager::registerInterface ( PluginLoader $loader)

Definition at line 117 of file PluginManager.php.

◆ tickSchedulers()

pocketmine\plugin\PluginManager::tickSchedulers ( int $currentTick)

Definition at line 535 of file PluginManager.php.

Member Data Documentation

◆ $enabledPlugins

array pocketmine\plugin\PluginManager::$enabledPlugins = []
protected

Definition at line 82 of file PluginManager.php.

◆ $fileAssociations

array pocketmine\plugin\PluginManager::$fileAssociations = []
protected

Definition at line 93 of file PluginManager.php.

◆ $plugins

array pocketmine\plugin\PluginManager::$plugins = []
protected

Definition at line 76 of file PluginManager.php.


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