mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2026-01-04 15:41:45 +00:00
Better title handling
This commit is contained in:
@@ -67,9 +67,13 @@ public class MessagesUtil {
|
||||
}
|
||||
|
||||
public static void sendTitle(Player player, String message) {
|
||||
sendTitle(player, message, 2000, 2000, 2000);
|
||||
}
|
||||
|
||||
public static void sendTitle(Player player, String message, int fadein, int stay, int fadeout) {
|
||||
Audience target = BukkitAudiences.create(HMCCosmeticsPlugin.getInstance()).player(player);
|
||||
|
||||
Title.Times times = Title.Times.times(Duration.ofMillis(3000), Duration.ofMillis(3000), Duration.ofMillis(1000));
|
||||
Title.Times times = Title.Times.times(Duration.ofMillis(WardrobeSettings.getTransitionFadeIn()), Duration.ofMillis(3000), Duration.ofMillis(1000));
|
||||
Title title = Title.title(processStringNoKey(player, message), Component.empty(), times);
|
||||
|
||||
target.showTitle(title);
|
||||
|
||||
Reference in New Issue
Block a user