PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
__construct (private PluginLoader $loader, private Server $server, private PluginDescription $description, private string $dataFolder, private string $file, private ResourceProvider $resourceProvider) | |
getCommand (string $name) | |
getConfig () | |
getDataFolder () | |
getDescription () | |
getFullName () | |
getLogger () | |
getName () | |
getPluginLoader () | |
getResource (string $filename) | |
getResourceFolder () | |
getResourcePath (string $filename) | |
getResources () | |
getScheduler () | |
getServer () | |
isDisabled () | |
isEnabled () | |
onCommand (CommandSender $sender, Command $command, string $label, array $args) | |
onEnableStateChange (bool $enabled) | |
reloadConfig () | |
saveConfig () | |
saveDefaultConfig () | |
saveResource (string $filename, bool $replace=false) | |
Protected Member Functions | |
getFile () | |
onDisable () | |
onEnable () | |
onLoad () | |
Definition at line 47 of file PluginBase.php.
pocketmine\plugin\PluginBase::__construct | ( | private PluginLoader | $loader, |
private Server | $server, | ||
private PluginDescription | $description, | ||
private string | $dataFolder, | ||
private string | $file, | ||
private ResourceProvider | $resourceProvider ) |
Definition at line 58 of file PluginBase.php.
pocketmine\plugin\PluginBase::getCommand | ( | string | $name | ) |
Definition at line 192 of file PluginBase.php.
References pocketmine\server().
pocketmine\plugin\PluginBase::getConfig | ( | ) |
Definition at line 277 of file PluginBase.php.
|
final |
Gets the plugin's data folder to save files and configuration. This directory name has a trailing slash.
Implements pocketmine\plugin\Plugin.
Definition at line 130 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 134 of file PluginBase.php.
|
protected |
Definition at line 313 of file PluginBase.php.
|
final |
Definition at line 309 of file PluginBase.php.
pocketmine\plugin\PluginBase::getLogger | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 138 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 305 of file PluginBase.php.
pocketmine\plugin\PluginBase::getPluginLoader | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 317 of file PluginBase.php.
pocketmine\plugin\PluginBase::getResource | ( | string | $filename | ) |
PluginBase::getResourcePath()
, like file_get_contents() or fopen().Gets an embedded resource on the plugin file. WARNING: You must close the resource given using fclose()
Definition at line 239 of file PluginBase.php.
pocketmine\plugin\PluginBase::getResourceFolder | ( | ) |
Returns the path to the folder where the plugin's embedded resource files are usually located. Note: This is NOT the same as the data folder. The files in this folder should be considered read-only.
Definition at line 216 of file PluginBase.php.
pocketmine\plugin\PluginBase::getResourcePath | ( | string | $filename | ) |
Returns the full path to a data file in the plugin's resources folder. This path can be used with standard PHP functions like fopen() or file_get_contents().
Note: Any path returned by this function should be considered READ-ONLY.
Definition at line 226 of file PluginBase.php.
pocketmine\plugin\PluginBase::getResources | ( | ) |
Returns all the resources packaged with the plugin in the form ["path/in/resources" => SplFileInfo]
Definition at line 273 of file PluginBase.php.
pocketmine\plugin\PluginBase::getScheduler | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 321 of file PluginBase.php.
|
final |
Definition at line 301 of file PluginBase.php.
|
final |
Definition at line 126 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 104 of file PluginBase.php.
pocketmine\plugin\PluginBase::onCommand | ( | CommandSender | $sender, |
Command | $command, | ||
string | $label, | ||
array | $args ) |
string[] | $args |
Implements pocketmine\command\CommandExecutor.
Definition at line 208 of file PluginBase.php.
|
protected |
Called when the plugin is disabled Use this to free open things and finish actions
Definition at line 100 of file PluginBase.php.
|
protected |
Called when the plugin is enabled
Definition at line 92 of file PluginBase.php.
|
final |
Called by the plugin manager when the plugin is enabled or disabled to inform the plugin of its enabled state.
Implements pocketmine\plugin\Plugin.
Definition at line 115 of file PluginBase.php.
|
protected |
Called when the plugin is loaded, before calling onEnable()
Definition at line 85 of file PluginBase.php.
pocketmine\plugin\PluginBase::reloadConfig | ( | ) |
Definition at line 296 of file PluginBase.php.
pocketmine\plugin\PluginBase::saveConfig | ( | ) |
Definition at line 285 of file PluginBase.php.
pocketmine\plugin\PluginBase::saveDefaultConfig | ( | ) |
Definition at line 289 of file PluginBase.php.
pocketmine\plugin\PluginBase::saveResource | ( | string | $filename, |
bool | $replace = false ) |
Saves an embedded resource to its relative location in the data folder
Definition at line 246 of file PluginBase.php.