PocketMine-MP 5.21.3 git-fcef015f32c0b0709cfd4d6f1b3c32f484b25bde
|
Public Member Functions | |
__construct (?array $lines=null, ?Color $baseColor=null, bool $glowing=false) | |
getBaseColor () | |
getLine (int $index) | |
getLines () | |
isGlowing () | |
Static Public Member Functions | |
static | fromBlob (string $blob, ?Color $baseColor=null, bool $glowing=false) |
Public Attributes | |
const | LINE_COUNT = 4 |
Definition at line 36 of file SignText.php.
pocketmine\block\utils\SignText::__construct | ( | ?array | $lines = null, |
?Color | $baseColor = null, | ||
bool | $glowing = false ) |
string[] | null | $lines | index-sensitive; keys 0-3 will be used, regardless of array order @phpstan-param array{0?: string, 1?: string, 2?: string, 3?: string}|null $lines |
InvalidArgumentException if the array size is greater than 4
InvalidArgumentException if invalid keys (out of bounds or string) are found in the array
InvalidArgumentException if any line is not valid UTF-8 or contains a newline
Definition at line 55 of file SignText.php.
|
static |
Parses sign lines from the given string blob. TODO: add a strict mode for this
InvalidArgumentException if the text is not valid UTF-8
Definition at line 81 of file SignText.php.
pocketmine\block\utils\SignText::getBaseColor | ( | ) |
Returns the base text color of sign. Color codes using the ยง escape character will override this color when used.
Definition at line 117 of file SignText.php.
pocketmine\block\utils\SignText::getLine | ( | int | $index | ) |
Returns the sign line at the given offset.
InvalidArgumentException
Definition at line 109 of file SignText.php.
pocketmine\block\utils\SignText::getLines | ( | ) |
Returns an array of lines currently on the sign.
Definition at line 91 of file SignText.php.
pocketmine\block\utils\SignText::isGlowing | ( | ) |
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.
Definition at line 125 of file SignText.php.
const pocketmine\block\utils\SignText::LINE_COUNT = 4 |
Definition at line 37 of file SignText.php.