PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
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 |
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 51 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 77 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 112 of file SignText.php.
pocketmine\block\utils\SignText::getLine | ( | int | $index | ) |
Returns the sign line at the given offset.
InvalidArgumentException
Definition at line 104 of file SignText.php.
pocketmine\block\utils\SignText::getLines | ( | ) |
Returns an array of lines currently on the sign.
Definition at line 86 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 120 of file SignText.php.
const pocketmine\block\utils\SignText::LINE_COUNT = 4 |
Definition at line 37 of file SignText.php.