Skip to content

SignChangeEvent ​

class · pocketmine\event\block\SignChangeEvent · source

Extends BlockEvent
Implements Cancellable

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

Methods ​

__construct() ​

php
public function __construct(\pocketmine\block\BaseSign $sign, \pocketmine\player\Player $player, \pocketmine\block\utils\SignText $text, bool $frontFace = true)

getNewText() ​

php
public function getNewText() : \pocketmine\block\utils\SignText

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

getOldText() ​

php
public function getOldText() : \pocketmine\block\utils\SignText

Returns the text currently on the sign.

getPlayer() ​

php
public function getPlayer() : \pocketmine\player\Player

getSign() ​

php
public function getSign() : \pocketmine\block\BaseSign

isFrontFace() ​

php
public function isFrontFace() : bool

setNewText() ​

php
public function setNewText(\pocketmine\block\utils\SignText $text) : void

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

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.