Class ExpandVars
Common variable expansion. You can use this for custom messages and/or custom commands.
Plugins can extend this infrastructure by declaring the following functions:
public function getSysVarsV1(array &$vars);
public function getPlayerVarsV1(Player $player, array &$vars);
Otherwise they can call the functions: registerSysVars or registerPlayerVars.
public
|
|
public static
|
#
getCommonVars( pocketmine\plugin\Plugin $owner )
If GrabBag is available, try to get a single shared instance of ExpandVars |
public
|
|
public
|
|
public
|
|
public
|
|
public
mixed
|
|
protected
|
#
autoloadExtensions( $mode )
Scan loaded plugins and identifies which plugins have an entry point to variable expansions... |
protected
|
|
public
|
#
registerSysVars( callable $fn, callable $fn,… )
Register a callback function that define system wide variable expansions |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
public
|
#
registerPlayerVars( callable $fn )
Register a callback function that define player specific variable expansions |
public
|
#
playerVars( pocketmine\Player $player, array & $vars )
Main entry point for player specifc variable defintions |
public
|
#
playerVarsShort( pocketmine\Player $player, array & $vars )
Shorter entry point for player specifc variable defintions |
public
|
#
stdPlayerVars( pocketmine\Player $player, array & $vars )
Basic player specific variable definitions |
public
|
|
public
|
#
kr1PlayerVars( pocketmine\Player $player, array & $vars )
KillRate-1.1 compatible player variables |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public static
str
|
string |
getSysVarsFn
|
#
"getSysVarsV1"
|
string |
getPlayerVarsFn
|
#
"getPlayerVarsV1"
|
protected
callable[]
|
$playerExtensions
Callables to create player specific variables |
|
protected
callable[]
|
$sysExtensions
Callables to create server wide variables |
|
protected
array
|
$apitable
API table |
|
protected
str[]
|
$consts
static constants |
|
protected
Server
|
$owner
pocketmine server context |