PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
pocketmine\event\block\BrewItemEvent Class Reference
+ Inheritance diagram for pocketmine\event\block\BrewItemEvent:
+ Collaboration diagram for pocketmine\event\block\BrewItemEvent:

Public Member Functions

 __construct (private BrewingStand $brewingStand, private int $slot, private Item $input, private Item $result, private BrewingRecipe $recipe)
 
 call ()
 
 getBlock ()
 
 getBrewingStand ()
 
 getEventName ()
 
 getInput ()
 
 getRecipe ()
 
 getResult ()
 
 getSlot ()
 
 isCancelled ()
 
 setResult (Item $result)
 

Static Public Member Functions

static hasHandlers ()
 

Protected Attributes

string $eventName = null
 

Detailed Description

Definition at line 32 of file BrewItemEvent.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\event\block\BrewItemEvent::__construct ( private BrewingStand  $brewingStand,
private int  $slot,
private Item  $input,
private Item  $result,
private BrewingRecipe  $recipe 
)

Definition at line 35 of file BrewItemEvent.php.

Member Function Documentation

◆ call()

pocketmine\event\Event::call ( )
inherited

Calls event handlers registered for this event.

Exceptions

RuntimeException if event call recursion reaches the max depth limit

Definition at line 49 of file Event.php.

◆ getBlock()

pocketmine\event\block\BlockEvent::getBlock ( )
inherited

Definition at line 37 of file BlockEvent.php.

◆ getBrewingStand()

pocketmine\event\block\BrewItemEvent::getBrewingStand ( )

Definition at line 45 of file BrewItemEvent.php.

◆ getEventName()

pocketmine\event\Event::getEventName ( )
finalinherited

Definition at line 40 of file Event.php.

◆ getInput()

pocketmine\event\block\BrewItemEvent::getInput ( )

Definition at line 56 of file BrewItemEvent.php.

◆ getRecipe()

pocketmine\event\block\BrewItemEvent::getRecipe ( )

Definition at line 68 of file BrewItemEvent.php.

◆ getResult()

pocketmine\event\block\BrewItemEvent::getResult ( )

Definition at line 60 of file BrewItemEvent.php.

◆ getSlot()

pocketmine\event\block\BrewItemEvent::getSlot ( )

Returns which slot of the brewing stand's inventory the potion is in.

Definition at line 52 of file BrewItemEvent.php.

◆ hasHandlers()

static pocketmine\event\Event::hasHandlers ( )
staticinherited

Returns whether the current class context has any registered global handlers. This can be used in hot code paths to avoid unnecessary event object creation.

Usage: SomeEventClass::hasHandlers()

Definition at line 77 of file Event.php.

◆ isCancelled()

pocketmine\event\Cancellable::isCancelled ( )
inherited

Returns whether this instance of the event is currently cancelled.

If it is cancelled, only downstream handlers that declare @handleCancelled will be called with this event.

◆ setResult()

pocketmine\event\block\BrewItemEvent::setResult ( Item  $result)

Definition at line 64 of file BrewItemEvent.php.

Member Data Documentation

◆ $eventName

string pocketmine\event\Event::$eventName = null
protectedinherited

Definition at line 38 of file Event.php.


The documentation for this class was generated from the following file: