-
Notifications
You must be signed in to change notification settings - Fork 0
TitleUtils
Fulminazzo edited this page Oct 2, 2023
·
1 revision
TitleUtils is a general utility class created to send titles and subtitles across platforms.
At the time of writing this guide, Bukkit, BungeeCord and Velocity support titles,
therefore BearCommands provides this series of functions to help unify the sending of one title across platforms and versions (from 1.8 to the latest Minecraft version).
There are many different functions which all recall the more general function sendGeneralTitle()
:
public class TitleUtils {
/**
* Sends a title to a player.
* @param player: the player;
* @param title: the title;
*/
public static void sendTitle(Object player, String title);
/**
* Sends a title to a player.
* @param player: the player;
* @param title: the title;
* @param start: duration of starting fade;
* @param duration: duration of the title;
* @param end: duration of ending fade.
*/
public static void sendTitle(Object player, String title, int start, int duration, int end);
/**
* Sends a subtitle to a player.
* @param player: the player;
* @param subTitle: the subtitle;
*/
public static void sendSubTitle(Object player, String subTitle);
/**
* Sends a subtitle to a player.
* @param player: the player;
* @param subTitle: the subtitle;
* @param start: duration of starting fade;
* @param duration: duration of the title;
* @param end: duration of ending fade.
*/
public static void sendSubTitle(Object player, String subTitle, int start, int duration, int end);
/**
* Sends a title and a subtitle to a player.
* @param player: the player;
* @param title: the title;
* @param subTitle: the subtitle;
*/
public static void sendGeneralTitle(Object player, String title, String subTitle);
/**
* Sends a title and a subtitle to a player.
* @param player: the player;
* @param title: the title;
* @param subTitle: the subtitle;
* @param start: duration of starting fade;
* @param duration: duration of the title;
* @param end: duration of ending fade.
*/
public static void sendGeneralTitle(Object player, String title, String subTitle, int start, int duration, int end);
}
- Home
- How to start a plugin
- Work with Configuration Files
- Work with Enums
- Work with Commands
- Work with Custom Players
- Work with Messaging Channels
- Creating custom SavableObjects
- Timers
- General Utils
- Placeholders
- Bukkit Utils
- Velocity Utils