Skip to content

Sign ​

class · pocketmine\block\tile\Sign · source

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 $text

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos)

addAdditionalSpawnData() protected ​

php
protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

fixTextBlob() ​

php
public static function fixTextBlob(string $blob) : array

Deprecated

Deprecated.

getBackText() ​

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

getEditorEntityRuntimeId() ​

php
public function getEditorEntityRuntimeId() : ?int

Returns 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\SignText

isWaxed() ​

php
public function isWaxed() : bool

readSaveData() ​

php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

setBackText() ​

php
public function setBackText(\pocketmine\block\utils\SignText $backText) : void

setEditorEntityRuntimeId() ​

php
public function setEditorEntityRuntimeId(?int $editorEntityRuntimeId) : void

setText() ​

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

setWaxed() ​

php
public function setWaxed(bool $waxed) : void

writeSaveData() protected ​

php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

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