Skip to content

SignText ​

class · pocketmine\block\utils\SignText · source

Constants ​

LINE_COUNT ​

php
public const LINE_COUNT = 4

Methods ​

__construct() ​

php
public function __construct(?array $lines = null, ?\pocketmine\color\Color $baseColor = null, bool $glowing = false)

fromBlob() ​

php
public static function fromBlob(string $blob, ?\pocketmine\color\Color $baseColor = null, bool $glowing = false) : \pocketmine\block\utils\SignText

Parses sign lines from the given string blob. TODO: add a strict mode for this

getBaseColor() ​

php
public function getBaseColor() : \pocketmine\color\Color

Returns the base text color of sign. Color codes using the § escape character will override this color when used.

getLine() ​

php
public function getLine(int $index) : string

Returns the sign line at the given offset.

getLines() ​

php
public function getLines() : array

Returns an array of lines currently on the sign.

isGlowing() ​

php
public function isGlowing() : bool

Returns whether the sign text is glowing. When true, the text will have an outline (usually a darker tone of the base color, or white for black text), and will glow in the dark, making it readable without any light sources.

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