Terminal
in package
Table of Contents
- $COLOR_AQUA : string
- $COLOR_BLACK : string
- $COLOR_BLUE : string
- $COLOR_DARK_AQUA : string
- $COLOR_DARK_BLUE : string
- $COLOR_DARK_GRAY : string
- $COLOR_DARK_GREEN : string
- $COLOR_DARK_RED : string
- $COLOR_GOLD : string
- $COLOR_GRAY : string
- $COLOR_GREEN : string
- $COLOR_LIGHT_PURPLE : string
- $COLOR_PURPLE : string
- $COLOR_RED : string
- $COLOR_WHITE : string
- $COLOR_YELLOW : string
- $FORMAT_BOLD : string
- $FORMAT_ITALIC : string
- $FORMAT_OBFUSCATED : string
- $FORMAT_RESET : string
- $FORMAT_STRIKETHROUGH : string
- $FORMAT_UNDERLINE : string
- $formattingCodes : bool|null
- hasFormattingCodes() : bool
- init() : void
- isInit() : bool
- toANSI() : string
- Returns a string with colorized ANSI Escape codes for the current terminal Note that this is platform-dependent and might produce different results depending on the terminal type and/or OS.
- write() : void
- Emits a string containing Minecraft colour codes to the console formatted with native colours.
- writeLine() : void
- Emits a string containing Minecraft colour codes to the console formatted with native colours, followed by a newline character.
- getEscapeCodes() : void
- getFallbackEscapeCodes() : void
- detectFormattingCodesSupport() : bool
Properties
$COLOR_AQUA
public
static string
$COLOR_AQUA
= ""
$COLOR_BLACK
public
static string
$COLOR_BLACK
= ""
$COLOR_BLUE
public
static string
$COLOR_BLUE
= ""
$COLOR_DARK_AQUA
public
static string
$COLOR_DARK_AQUA
= ""
$COLOR_DARK_BLUE
public
static string
$COLOR_DARK_BLUE
= ""
$COLOR_DARK_GRAY
public
static string
$COLOR_DARK_GRAY
= ""
$COLOR_DARK_GREEN
public
static string
$COLOR_DARK_GREEN
= ""
$COLOR_DARK_RED
public
static string
$COLOR_DARK_RED
= ""
$COLOR_GOLD
public
static string
$COLOR_GOLD
= ""
$COLOR_GRAY
public
static string
$COLOR_GRAY
= ""
$COLOR_GREEN
public
static string
$COLOR_GREEN
= ""
$COLOR_LIGHT_PURPLE
public
static string
$COLOR_LIGHT_PURPLE
= ""
$COLOR_PURPLE
public
static string
$COLOR_PURPLE
= ""
$COLOR_RED
public
static string
$COLOR_RED
= ""
$COLOR_WHITE
public
static string
$COLOR_WHITE
= ""
$COLOR_YELLOW
public
static string
$COLOR_YELLOW
= ""
$FORMAT_BOLD
public
static string
$FORMAT_BOLD
= ""
$FORMAT_ITALIC
public
static string
$FORMAT_ITALIC
= ""
$FORMAT_OBFUSCATED
public
static string
$FORMAT_OBFUSCATED
= ""
$FORMAT_RESET
public
static string
$FORMAT_RESET
= ""
$FORMAT_STRIKETHROUGH
public
static string
$FORMAT_STRIKETHROUGH
= ""
$FORMAT_UNDERLINE
public
static string
$FORMAT_UNDERLINE
= ""
$formattingCodes
private
static bool|null
$formattingCodes
= null
Methods
hasFormattingCodes()
public
static hasFormattingCodes() : bool
Return values
bool —init()
public
static init([bool|null $enableFormatting = null ]) : void
Parameters
- $enableFormatting : bool|null = null
Return values
void —isInit()
public
static isInit() : bool
Return values
bool —toANSI()
Returns a string with colorized ANSI Escape codes for the current terminal Note that this is platform-dependent and might produce different results depending on the terminal type and/or OS.
public
static toANSI(string $string) : string
Parameters
- $string : string
Return values
string —write()
Emits a string containing Minecraft colour codes to the console formatted with native colours.
public
static write(string $line) : void
Parameters
- $line : string
Return values
void —writeLine()
Emits a string containing Minecraft colour codes to the console formatted with native colours, followed by a newline character.
public
static writeLine(string $line) : void
Parameters
- $line : string
Return values
void —getEscapeCodes()
protected
static getEscapeCodes() : void
Return values
void —getFallbackEscapeCodes()
protected
static getFallbackEscapeCodes() : void
Return values
void —detectFormattingCodesSupport()
private
static detectFormattingCodesSupport() : bool