PocketMine
PluginBase Class Reference
Inheritance diagram for PluginBase:
Plugin CommandExecutor

Public Member Functions

 onLoad ()
 
 onEnable ()
 
 onDisable ()
 
 isEnabled ()
 
 setEnabled ($boolean=true)
 
 isDisabled ()
 
 getDataFolder ()
 
 getDescription ()
 
 init (PluginLoader $loader, Server $server, PluginDescription $description, $dataFolder, $file)
 
 getLogger ()
 
 isInitialized ()
 
 getCommand ($name)
 
 onCommand (CommandSender $sender, Command $command, $label, array $args)
 
 getResource ($filename)
 
 saveResource ($filename, $replace=false)
 
 getResources ()
 
 getConfig ()
 
 saveConfig ()
 
 saveDefaultConfig ()
 
 reloadConfig ()
 
 getServer ()
 
 getName ()
 
 getFullName ()
 
 getPluginLoader ()
 

Protected Member Functions

 isPhar ()
 
 getFile ()
 

Member Function Documentation

getCommand (   $name)
Parameters
string$name
Returns
Command|PluginIdentifiableCommand
getConfig ( )
Returns
Config

Implements Plugin.

getDataFolder ( )
final

Gets the plugin's data folder to save files and configuration. This directory name has a trailing slash.

Implements Plugin.

getDescription ( )
final
Returns
PluginDescription

Implements Plugin.

getFullName ( )
final
Returns
string
getLogger ( )
Returns
PluginLogger

Implements Plugin.

getName ( )
final
Returns
string

Implements Plugin.

getPluginLoader ( )
Returns
PluginLoader

Implements Plugin.

getResource (   $filename)

Gets an embedded resource on the plugin file. WARNING: You must close the resource given using fclose()

Parameters
string$filename
Returns
resource Resource data, or null

Implements Plugin.

getResources ( )

Returns all the resources incrusted on the plugin

Returns
string[]

Implements Plugin.

getServer ( )
final
Returns
Server

Implements Plugin.

isDisabled ( )
final
Returns
bool

Implements Plugin.

isEnabled ( )
final
Returns
bool

Implements Plugin.

isInitialized ( )
final
Returns
bool
isPhar ( )
protected
Returns
bool
onCommand ( CommandSender  $sender,
Command  $command,
  $label,
array  $args 
)
Parameters
CommandSender$sender
Command$command
string$label
array$args
Returns
bool

Implements CommandExecutor.

onDisable ( )

Called when the plugin is disabled Use this to free open things and finish actions

Implements Plugin.

onEnable ( )

Called when the plugin is enabled

Implements Plugin.

onLoad ( )

Called when the plugin is loaded, before calling onEnable()

Implements Plugin.

saveResource (   $filename,
  $replace = false 
)
Parameters
string$filename
bool$replace
Returns
bool

Implements Plugin.

setEnabled (   $boolean = true)
final
Parameters
bool$boolean

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