Overview

Namespaces

  • aliuly
    • common
      • selectors
    • loader
  • xPaw

Classes

  • ArmorItems
  • BasicCli
  • BasicHelp
  • BasicPlugin
  • ChatSession
  • Cmd
  • CmdSelector
  • ExpandVars
  • FastTransfer
  • FileUtils
  • FreezeSession
  • GetMotd
  • GetMotdAsyncTask
  • InvisibleSession
  • InvUtils
  • ItemName
  • mc
  • mc2
  • MoneyAPI
  • MPMU
  • Npc
  • PermUtils
  • PluginAsyncTask
  • PluginCallbackTask
  • PMScript
  • QueryAsyncTask
  • Rcon
  • RconTask
  • Session
  • ShieldSession
  • ShoppingCart
  • SignUtils
  • SkinUtils
  • SpySession
  • SubCommandMap
  • TPUtils
  • Overview
  • Namespace
  • Class

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.

Namespace: aliuly\common
Located at aliuly/common/ExpandVars.php
Methods summary
public
# __construct( pocketmine\plugin\Plugin $owner )

Parameters

$owner
$server - server context
public static
# getCommonVars( pocketmine\plugin\Plugin $owner )

If GrabBag is available, try to get a single shared instance of ExpandVars

If GrabBag is available, try to get a single shared instance of ExpandVars

public
# define( str $str, str $value )

Define additional constants on the fly...

Define additional constants on the fly...

Parameters

$str
$name
$value
public
# getServer( )
public
# getConsts( )
public
# registerApi( str $apiname, mixed $ptr )

Register API

Register API

Parameters

$apiname
  • API id
$ptr
  • API object
public mixed
# api( str $apiname, boolean $exception = true )

Return API entry, if not found it will throw a RuntimeException

Return API entry, if not found it will throw a RuntimeException

Parameters

$apiname
  • API id
$exception
  • if true raise exemption on error

Returns

mixed
protected
# autoloadExtensions( $mode )

Scan loaded plugins and identifies which plugins have an entry point to variable expansions...

Scan loaded plugins and identifies which plugins have an entry point to variable expansions...

protected
# initSysVars( )

Used to initialize the system wide variables table

Used to initialize the system wide variables table

public
# registerSysVars( callable $fn, callable $fn,… )

Register a callback function that define system wide variable expansions

Register a callback function that define system wide variable expansions

Parameters

$fn
$server - reference to pocketmine server
$fn,…
  • callable should have as argumens (Server $server, array &$vars)
public
# sysVars( array & $vars )

Main entry point for system wide variable defintions

Main entry point for system wide variable defintions

Parameters

$vars
$vars - receives variable defintions
public
# sysVarsShort( array & $vars )

Shorter entry point for system wide variable defintions

Shorter entry point for system wide variable defintions

Parameters

$vars
$vars - receives variable defintions
public
# stdSysVars( array & $vars )

Basic system wide variable definitions

Basic system wide variable definitions

Parameters

$vars
$vars - variables
public
# debugSysVars( array & $vars )

Parameters

$vars
$vars - variables
public
# kr1SysVars( array & $vars )

KillRate v1.1 sysvars compatibility

KillRate v1.1 sysvars compatibility

Parameters

$vars
$vars - variables
protected
# initPlayerVars( )

Used to initialize the player specific variables table

Used to initialize the player specific variables table

public
# registerPlayerVars( callable $fn )

Register a callback function that define player specific variable expansions

Register a callback function that define player specific variable expansions

Parameters

$fn
  • callable should have as argumens (Player $player, array &$vars)
public
# playerVars( pocketmine\Player $player, array & $vars )

Main entry point for player specifc variable defintions

Main entry point for player specifc variable defintions

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# playerVarsShort( pocketmine\Player $player, array & $vars )

Shorter entry point for player specifc variable defintions

Shorter entry point for player specifc variable defintions

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# stdPlayerVars( pocketmine\Player $player, array & $vars )

Basic player specific variable definitions

Basic player specific variable definitions

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# invPlayerVars( pocketmine\Player $player, array & $vars )

Inventory related variables

Inventory related variables

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# kr1PlayerVars( pocketmine\Player $player, array & $vars )

KillRate-1.1 compatible player variables

KillRate-1.1 compatible player variables

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# moneyPlayerVarsPocketMoney( pocketmine\Player $player, array & $vars )

PocketMoney Support

PocketMoney Support

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# moneyPlayerVarsMassiveEconomy( pocketmine\Player $player, array & $vars )

MassiveEconomy Support

MassiveEconomy Support

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# moneyPlayerVarsEconomysApi( pocketmine\Player $player, array & $vars )

EconomysAPI Support

EconomysAPI Support

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# moneyPlayerVarsGoldStd( pocketmine\Player $player, array & $vars )

GoldStd Support

GoldStd Support

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# purePermsPlayerVars( pocketmine\Player $player, array & $vars )

PurePerms compatibility

PurePerms compatibility

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public
# rankUpPlayerVars( pocketmine\Player $player, array & $vars )

RankUp compatibility

RankUp compatibility

Parameters

$player
  • reference to pocketmine Player
$vars
$vars - receives variable defintions
public static str
# bearing( float $deg )

Convert bearings in degrees into points in compass

Convert bearings in degrees into points in compass

Parameters

$deg
  • yaw

Returns

str
Constants summary
string getSysVarsFn

Const

str getSysVarsFn This is the function signature for SysVars
# "getSysVarsV1"
string getPlayerVarsFn

Const

str getPlayerVarsFn This is the function signature for PlayerVars
# "getPlayerVarsV1"
Properties summary
protected callable[] $playerExtensions

Callables to create player specific variables

Callables to create player specific variables

#
protected callable[] $sysExtensions

Callables to create server wide variables

Callables to create server wide variables

#
protected array $apitable

API table

API table

#
protected str[] $consts

static constants

static constants

#
protected Server $owner

pocketmine server context

pocketmine server context

#
API documentation generated by ApiGen