PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\event\block\SignChangeEvent Class Reference
+ Inheritance diagram for pocketmine\event\block\SignChangeEvent:
+ Collaboration diagram for pocketmine\event\block\SignChangeEvent:

Public Member Functions

 __construct (private BaseSign $sign, private Player $player, private SignText $text)
 
 call ()
 
 getBlock ()
 
 getEventName ()
 
 getNewText ()
 
 getOldText ()
 
 getPlayer ()
 
 getSign ()
 
 isCancelled ()
 
 setNewText (SignText $text)
 

Static Public Member Functions

static hasHandlers ()
 

Protected Attributes

string $eventName = null
 

Detailed Description

Called when a sign's text is changed by a player.

Definition at line 35 of file SignChangeEvent.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\event\block\SignChangeEvent::__construct ( private BaseSign $sign,
private Player $player,
private SignText $text )

Definition at line 38 of file SignChangeEvent.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.

◆ getEventName()

pocketmine\event\Event::getEventName ( )
finalinherited

Definition at line 40 of file Event.php.

◆ getNewText()

pocketmine\event\block\SignChangeEvent::getNewText ( )

Returns the text which will be on the sign after the event.

Definition at line 64 of file SignChangeEvent.php.

◆ getOldText()

pocketmine\event\block\SignChangeEvent::getOldText ( )

Returns the text currently on the sign.

Definition at line 57 of file SignChangeEvent.php.

◆ getPlayer()

pocketmine\event\block\SignChangeEvent::getPlayer ( )

Definition at line 50 of file SignChangeEvent.php.

◆ getSign()

pocketmine\event\block\SignChangeEvent::getSign ( )

Definition at line 46 of file SignChangeEvent.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.

◆ setNewText()

pocketmine\event\block\SignChangeEvent::setNewText ( SignText $text)

Sets the text to be written on the sign after the event.

Definition at line 71 of file SignChangeEvent.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: