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 BasicPlugin

Simple extension to the PocketMine PluginBase class

pocketmine\plugin\PluginBase
Extended by aliuly\common\BasicPlugin
Abstract
Namespace: aliuly\common
Located at aliuly/common/BasicPlugin.php
Methods summary
protected array
# modConfig( str $ns, array $mods, array $defaults, str $xhlp = "" )

Given some defaults, this will load optional features

Given some defaults, this will load optional features

Parameters

$ns
  • namespace used to search for classes to load
$mods
  • optional module definition
$defaults
  • default options to use for config.yml
$xhlp
  • optional help format.

Returns

array
public mixed|null
# getModule( str $str )

Get module

Get module

Parameters

$str
$module - module to retrieve

Returns

mixed|null
public array
# getModules( )

Get Modules array

Get Modules array

Returns

array
public
# cfgSave( str $key, mixed $settings )

Save a config section to the plugins' config.yml

Save a config section to the plugins' config.yml

Parameters

$key
  • section to save
$settings
  • settings to save
protected
# dispatchSCmd( pocketmine\command\CommandSender $sender, pocketmine\command\Command $cmd, array $args, $data = null )

Dispatch commands using sub command table

Dispatch commands using sub command table

public
# getSCmdMap( )

Look-up sub command map

Look-up sub command map

Returns

SubCommandMap
public
# registerSCmd( str $cmd, callable $callable, array $opts )

Register a sub command

Register a sub command

Parameters

$cmd
  • sub command
$callable
  • callable to execute
$opts
  • additional options
public mixed
# getState( str $label, Player|str $player, mixed $default )

Get a player state for the desired module/$label.

Get a player state for the desired module/$label.

Parameters

$label
  • state variable to get
$player
  • Player instance or name
$default
  • default value to return is no state found

Returns

mixed
public mixed
# setState( str $label, Player|str $player, mixed $val )

Set a player related state

Set a player related state

Parameters

$label
  • state variable to set
$player
  • player instance or their name
$val
  • value to set

Returns

mixed
public
# unsetState( str $label, Player|str $player )

Clears a player related state

Clears a player related state

Parameters

$label
  • state variable to clear
$player
  • intance of Player or their name
public string|null
# getResourceContents( string $filename )

Gets the contents of an embedded resource on the plugin file.

Gets the contents of an embedded resource on the plugin file.

Parameters

$filename

Returns

string|null
Properties summary
protected array $modules
# []
protected $scmdMap
# null
protected $session
#
API documentation generated by ApiGen