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 ShoppingCart

Implements ShoppingCart iterations

aliuly\common\Session implements pocketmine\event\Listener
Extended by aliuly\common\ShoppingCart
Namespace: aliuly\common
Located at aliuly/common/ShoppingCart.php
Methods summary
public
# __construct( pocketmine\plugin\PluginBase $owner )

Parameters

$owner
  • plugin that owns this session

Overrides

aliuly\common\Session::__construct()
public
# onPlayerQuit( pocketmine\event\player\PlayerQuitEvent $ev )

Handle player quit events. Restore player's inventory before resetting state.

Handle player quit events. Restore player's inventory before resetting state.

Parameters

$ev
  • Quit event

Overrides

aliuly\common\Session::onPlayerQuit()
public
# start( Player $buyer, array $shop, ChestTile|null $tile = null )

Starts a Shopping Cart session.

Starts a Shopping Cart session.

Parameters

$buyer
  • player starting buying session
$shop
  • Shop items
$tile
  • Shop chest to use, otherwise null

The $shop array should contain the following:

 "id:meta" => [ pocketmine\item\Item, price ],
public
# onTransaction( pocketmine\event\inventory\InventoryTransactionEvent $ev )

Handle inventory transactions

Handle inventory transactions

Parameters

$ev
public
# onClose( pocketmine\event\inventory\InventoryCloseEvent $ev )

Close inventory event

Close inventory event

Parameters

$ev
public
# restoreInv( Player $pl )

Restore player's inventory

Restore player's inventory

Parameters

$pl
Methods inherited from aliuly\common\Session
getState(), setState(), unsetState()
Constants summary
string tag
# "shopping-cart"
Properties summary
protected $fakeChest
#
Properties inherited from aliuly\common\Session
$plugin, $state
API documentation generated by ApiGen