Skip to content

Action Bar

Title

Python
Title(
    title: str = "",
    subtitle: str = "",
    action_bar: str = "",
    fade_in: int = 10,
    stay: int = 70,
    fade_out: int = 20,
)

Minecraft Title representation and state manager.

ATTRIBUTE DESCRIPTION
title

Current title text

TYPE: str

subtitle

Current subtitle text

TYPE: str

action_bar

Current action bar text

TYPE: str

fade_in

Fade in time in ticks

TYPE: int

stay

Stay time in ticks

TYPE: int

fade_out

Fade out time in ticks

TYPE: int

visible

Whether the title is currently visible

TYPE: bool

set_title

Python
set_title(title: str) -> None

Set the main title text.

PARAMETER DESCRIPTION
title

The title text to display

TYPE: str

set_subtitle

Python
set_subtitle(subtitle: str) -> None

Set the subtitle text.

PARAMETER DESCRIPTION
subtitle

The subtitle text to display

TYPE: str

set_action_bar

Python
set_action_bar(action_bar: str) -> None

Set the action bar text.

PARAMETER DESCRIPTION
action_bar

The action bar text to display

TYPE: str

set_times

Python
set_times(fade_in: int, stay: int, fade_out: int) -> None

Set the timing parameters for title display.

PARAMETER DESCRIPTION
fade_in

Ticks to spend fading in

TYPE: int

stay

Ticks to keep the title displayed

TYPE: int

fade_out

Ticks to spend fading out

TYPE: int

show

Python
show() -> None

Show the title.

hide

Python
hide() -> None

Hide the title.

reset

Python
reset() -> None

Reset the title to default state.

total_duration_ticks

Python
total_duration_ticks() -> int

Get total duration of title display in ticks.

RETURNS DESCRIPTION
int

Total duration (fade_in + stay + fade_out)

total_duration_seconds

Python
total_duration_seconds() -> float

Get total duration of title display in seconds.

RETURNS DESCRIPTION
float

Total duration in seconds (20 ticks = 1 second)

has_content

Python
has_content() -> bool

Check if title has any content to display.

RETURNS DESCRIPTION
bool

True if title, subtitle, or action bar has content

is_visible

Python
is_visible() -> bool

Check if title should be visible.

RETURNS DESCRIPTION
bool

True if visible and has content