BeaconPaymentTransaction 5.46.0
Extends InventoryTransaction
Choosing the powers of a beacon in its window. Exactly one payment item (iron ingot, gold ingot, emerald, diamond or netherite ingot) must be taken out of the payment slot and destroyed, and the powers must be allowed by the pyramid under the beacon, which is checked again when the transaction is validated.
Methods
__construct()
php
public function __construct(\pocketmine\player\Player $source, \pocketmine\block\inventory\BeaconInventory $beaconInventory, \pocketmine\entity\effect\Effect $primaryEffect, ?\pocketmine\entity\effect\Effect $secondaryEffect, array $actions = [])execute()
php
public function execute() : voidgetBeaconInventory()
php
public function getBeaconInventory() : \pocketmine\block\inventory\BeaconInventorygetPrimaryEffect()
php
public function getPrimaryEffect() : \pocketmine\entity\effect\EffectgetSecondaryEffect()
php
public function getSecondaryEffect() : ?\pocketmine\entity\effect\Effectvalidate()
php
public function validate() : void