Soncresity Industries Wiki

Title Utilities

Allows you to show and broadcast fully customizable Titles to players

Introduction

A fully functional Version of this class has first been introduced in Version 2.1.0

The Decimal Utilities class allows you to show and broadcast fully customizable Titles to players using the Adventure/MiniMessage API.

Class

File: TitleUtils.java

Package: dev.soncresityindustries.es.api.v0.util

Methods

showTitle

Optional Arguments

Method arguments that are inside of square brackets ([]) are optional, however you must either provide no timings or all timings (fadein, stay and fadeout)

public static void showTitle(@NotNull ServerPlayer player, @NotNull String title, [@NotNull String subtitle], [@NotNull long fadein], [@NotNull long stay], [@NotNull long fadeout]) {}

Formatting

Both title and subtitle support MiniMessage Formatting

Usage

TitleUtils.showTitle(player, title, subtitle, fadein, stay, fadeout);

broadcastTitle

Optional Arguments

Method arguments that are inside of square brackets ([]) are optional, however you must either provide no timings or all timings (fadein, stay and fadeout)

public static void broadcastTitle(@NotNull MinecraftServer server, @NotNull String title, [@NotNull String subtitle], [@NotNull long fadein], [@NotNull long stay], [@NotNull long fadeout]) {}

Formatting

Both title and subtitle support MiniMessage Formatting

Usage

TitleUtils.broadcastTitle(server, title, subtitle, fadein, stay, fadeout);

Tip

If you can only access a ServerPlayer instance and not MinecraftServer directly, you can use player.level().getServer() as the argument.

On this page