Sign
Extends Spawnable
Deprecated
This class is deprecated.
Constants
TAG_BACK_TEXT
php
public const TAG_BACK_TEXT = "BackText"TAG_FRONT_TEXT
php
public const TAG_FRONT_TEXT = "FrontText"TAG_GLOWING_TEXT
php
public const TAG_GLOWING_TEXT = "IgnoreLighting"TAG_LEGACY_BUG_RESOLVE
php
public const TAG_LEGACY_BUG_RESOLVE = "TextIgnoreLegacyBugResolved"This tag is set to indicate that MCPE-117835 has been addressed in whatever version this sign was created.
TAG_LOCKED_FOR_EDITING_BY
php
public const TAG_LOCKED_FOR_EDITING_BY = "LockedForEditingBy"TAG_PERSIST_FORMATTING
php
public const TAG_PERSIST_FORMATTING = "PersistFormatting"TAG_TEXT_BLOB
php
public const TAG_TEXT_BLOB = "Text"TAG_TEXT_COLOR
php
public const TAG_TEXT_COLOR = "SignTextColor"TAG_TEXT_LINE
php
public const TAG_TEXT_LINE = "Text%d"TAG_WAXED
php
public const TAG_WAXED = "IsWaxed"Properties
$backText protected
php
protected \pocketmine\block\utils\SignText $backText$editorEntityRuntimeId protected
php
protected ?int $editorEntityRuntimeId$text protected
php
protected \pocketmine\block\utils\SignText $textMethods
__construct()
php
public function __construct(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos)addAdditionalSpawnData() protected
php
protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidfixTextBlob()
php
public static function fixTextBlob(string $blob) : arrayDeprecated
Deprecated.
getBackText()
php
public function getBackText() : \pocketmine\block\utils\SignTextgetEditorEntityRuntimeId()
php
public function getEditorEntityRuntimeId() : ?intReturns the entity runtime ID of the player who placed this sign. Only the player whose entity ID matches this one may edit the sign text. This is needed because as of 1.16.220, there is still no reliable way to detect when the MCPE client closed the sign edit GUI, so we have no way to know when the text is finalized. This limits editing of the text to only the player who placed it, and only while that player is online. We can say for sure that the sign is finalized if either of the following occurs:
- The player quits (after rejoin, the player's entity runtimeID will be different).
- The chunk is unloaded (on next load, the entity runtimeID will be null, because it's not saved).
getText()
php
public function getText() : \pocketmine\block\utils\SignTextisWaxed()
php
public function isWaxed() : boolreadSaveData()
php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidsetBackText()
php
public function setBackText(\pocketmine\block\utils\SignText $backText) : voidsetEditorEntityRuntimeId()
php
public function setEditorEntityRuntimeId(?int $editorEntityRuntimeId) : voidsetText()
php
public function setText(\pocketmine\block\utils\SignText $text) : voidsetWaxed()
php
public function setWaxed(bool $waxed) : voidwriteSaveData() protected
php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void