PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
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 89 of file PluginManager.php.

Member Function Documentation

◆ clearPlugins()

pocketmine\plugin\PluginManager::clearPlugins ( )

Definition at line 538 of file PluginManager.php.

◆ disablePlugin()

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

Definition at line 506 of file PluginManager.php.

◆ disablePlugins()

pocketmine\plugin\PluginManager::disablePlugins ( )

Definition at line 489 of file PluginManager.php.

◆ enablePlugin()

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

Definition at line 448 of file PluginManager.php.

◆ getPlugin()

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

Definition at line 103 of file PluginManager.php.

◆ getPlugins()

pocketmine\plugin\PluginManager::getPlugins ( )

Definition at line 118 of file PluginManager.php.

◆ isPluginEnabled()

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

Definition at line 444 of file PluginManager.php.

◆ loadPlugins()

pocketmine\plugin\PluginManager::loadPlugins ( string  $path,
int &  $loadErrorCount = 0 

Definition at line 346 of file PluginManager.php.

◆ registerEvent()

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

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



Definition at line 646 of file PluginManager.php.

◆ registerEvents()

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

Registers all the events in the given Listener class


Definition at line 591 of file PluginManager.php.

◆ registerInterface()

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

Definition at line 111 of file PluginManager.php.

◆ tickSchedulers()

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

Definition at line 528 of file PluginManager.php.

Member Data Documentation

◆ $enabledPlugins

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

Definition at line 76 of file PluginManager.php.

◆ $fileAssociations

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

Definition at line 87 of file PluginManager.php.

◆ $plugins

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

Definition at line 73 of file PluginManager.php.

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