SwapStackRequestAction
extends ItemStackRequestAction
in package
Uses
GetTypeIdFromConstTrait
Swaps two stacks. These don't have to be in the same inventory. This action does not modify the stacks themselves.
Table of Contents
- ID = \pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestActionType::SWAP
- $slot1 : ItemStackRequestSlotInfo
- $slot2 : ItemStackRequestSlotInfo
- __construct() : mixed
- getSlot1() : ItemStackRequestSlotInfo
- getSlot2() : ItemStackRequestSlotInfo
- getTypeId() : int
- read() : self
- write() : void
Constants
ID
public
mixed
ID
= \pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestActionType::SWAP
Properties
$slot1
private
ItemStackRequestSlotInfo
$slot1
$slot2
private
ItemStackRequestSlotInfo
$slot2
Methods
__construct()
public
__construct(ItemStackRequestSlotInfo $slot1, ItemStackRequestSlotInfo $slot2) : mixed
Parameters
- $slot1 : ItemStackRequestSlotInfo
- $slot2 : ItemStackRequestSlotInfo
Return values
mixed —getSlot1()
public
getSlot1() : ItemStackRequestSlotInfo
Return values
ItemStackRequestSlotInfo —getSlot2()
public
getSlot2() : ItemStackRequestSlotInfo
Return values
ItemStackRequestSlotInfo —getTypeId()
public
abstract getTypeId() : int
Return values
int —read()
public
static read(PacketSerializer $in) : self
Parameters
- $in : PacketSerializer
Return values
self —write()
public
write(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer