PocketMine-MP 5.28.1 git-88cdc2eb67c40075559c3ef51418b418cd5488e9
|
Public Member Functions | |
__construct (private Server $server, private PluginDescription $description, private string $dataFolder, private string $file, private string $resourceFolder,) | |
getCommand (string $name) | |
getConfig () | |
getDataFolder () | |
getDescription () | |
getFile () | |
getFullName () | |
getLogger () | |
getName () | |
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 | |
onDisable () | |
onEnable () | |
onLoad () | |
Definition at line 52 of file PluginBase.php.
pocketmine\plugin\PluginBase::__construct | ( | private Server | $server, |
private PluginDescription | $description, | ||
private string | $dataFolder, | ||
private string | $file, | ||
private string | $resourceFolder ) |
Definition at line 61 of file PluginBase.php.
pocketmine\plugin\PluginBase::getCommand | ( | string | $name | ) |
Definition at line 193 of file PluginBase.php.
References pocketmine\server().
pocketmine\plugin\PluginBase::getConfig | ( | ) |
Definition at line 276 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 131 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 135 of file PluginBase.php.
pocketmine\plugin\PluginBase::getFile | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 312 of file PluginBase.php.
|
final |
Definition at line 308 of file PluginBase.php.
pocketmine\plugin\PluginBase::getLogger | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 139 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 304 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 217 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 227 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 261 of file PluginBase.php.
pocketmine\plugin\PluginBase::getScheduler | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 316 of file PluginBase.php.
|
final |
Definition at line 300 of file PluginBase.php.
|
final |
Definition at line 127 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 105 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 209 of file PluginBase.php.
|
protected |
Called when the plugin is disabled Use this to free open things and finish actions
Definition at line 101 of file PluginBase.php.
|
protected |
Called when the plugin is enabled
Definition at line 93 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 116 of file PluginBase.php.
|
protected |
Called when the plugin is loaded, before calling onEnable()
Definition at line 86 of file PluginBase.php.
pocketmine\plugin\PluginBase::reloadConfig | ( | ) |
Definition at line 295 of file PluginBase.php.
pocketmine\plugin\PluginBase::saveConfig | ( | ) |
Definition at line 284 of file PluginBase.php.
pocketmine\plugin\PluginBase::saveDefaultConfig | ( | ) |
Definition at line 288 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 234 of file PluginBase.php.