PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
__construct (private PluginLoader $loader, private Server $server, private PluginDescription $description, private string $dataFolder, private string $file, private string $resourceFolder,) | |
getCommand (string $name) | |
getConfig () | |
getDataFolder () | |
getDescription () | |
getFullName () | |
getLogger () | |
getName () | |
getPluginLoader () | |
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 52 of file PluginBase.php.
pocketmine\plugin\PluginBase::__construct | ( | private PluginLoader | $loader, |
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 195 of file PluginBase.php.
References pocketmine\server().
pocketmine\plugin\PluginBase::getConfig | ( | ) |
Definition at line 278 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 133 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 137 of file PluginBase.php.
|
protected |
Definition at line 314 of file PluginBase.php.
|
final |
Definition at line 310 of file PluginBase.php.
pocketmine\plugin\PluginBase::getLogger | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 141 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 306 of file PluginBase.php.
pocketmine\plugin\PluginBase::getPluginLoader | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 318 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 219 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 229 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 263 of file PluginBase.php.
pocketmine\plugin\PluginBase::getScheduler | ( | ) |
Implements pocketmine\plugin\Plugin.
Definition at line 322 of file PluginBase.php.
|
final |
Definition at line 302 of file PluginBase.php.
|
final |
Definition at line 129 of file PluginBase.php.
|
final |
Implements pocketmine\plugin\Plugin.
Definition at line 107 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 211 of file PluginBase.php.
|
protected |
Called when the plugin is disabled Use this to free open things and finish actions
Definition at line 103 of file PluginBase.php.
|
protected |
Called when the plugin is enabled
Definition at line 95 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 118 of file PluginBase.php.
|
protected |
Called when the plugin is loaded, before calling onEnable()
Definition at line 88 of file PluginBase.php.
pocketmine\plugin\PluginBase::reloadConfig | ( | ) |
Definition at line 297 of file PluginBase.php.
pocketmine\plugin\PluginBase::saveConfig | ( | ) |
Definition at line 286 of file PluginBase.php.
pocketmine\plugin\PluginBase::saveDefaultConfig | ( | ) |
Definition at line 290 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 236 of file PluginBase.php.