Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- showEventTitleToUniverse(Message, Message, boolean, String, float, float, float)
- showEventTitleToUniverse(Message, Message, EventTitleStyle, String, float, float, float)
- showEventTitleToUniverse(EventTitleConfig)
- showEventTitleToWorld(Message, Message, boolean, String, float, float, float, World)
- showEventTitleToWorld(Message, Message, EventTitleStyle, String, float, float, float, World)
- showEventTitleToWorld(EventTitleConfig, World)
- hideEventTitleFromWorld(float, World)
- showEventTitleToPlayer(PlayerRef, Message, Message, boolean, String, float, float, float)
- showEventTitleToPlayer(PlayerRef, Message, Message, EventTitleStyle, String, float, float, float)
- showEventTitleToPlayer(PlayerRef, EventTitleConfig)
- showEventTitleToPlayer(PlayerRef, Message, Message, boolean)
- showEventTitleToPlayer(PlayerRef, Message, Message, EventTitleStyle)
- hideEventTitleFromPlayer(PlayerRef, float)
- getDefaultFadeInDuration(EventTitleStyle)
Class EventTitleUtil
java.lang.Object
com.hypixel.hytale.server.core.util.EventTitleUtil
A utility class that contains a variety of useful event title methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatThe default duration, in seconds, for an event title.static final floatThe default fade duration, in seconds, for an event title.static final StringThe default zone name, for an event title. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatGets the default fade-in duration for an event title style.static voidhideEventTitleFromPlayer(PlayerRef playerRefComponent, float fadeOutDuration) Hide the event title from a specific player.static voidhideEventTitleFromWorld(float fadeOutDuration, World world) Hide the event title from all players in the world.static voidshowEventTitleToPlayer(PlayerRef playerRefComponent, Message primaryTitle, Message secondaryTitle, boolean isMajor) Deprecated, for removal: This API element is subject to removal in a future version.static voidshowEventTitleToPlayer(PlayerRef playerRefComponent, Message primaryTitle, Message secondaryTitle, boolean isMajor, String icon, float duration, float fadeInDuration, float fadeOutDuration) Deprecated, for removal: This API element is subject to removal in a future version.static voidshowEventTitleToPlayer(PlayerRef playerRefComponent, Message primaryTitle, Message secondaryTitle, EventTitleStyle style) Show an event title to a specific player with default duration and fade durations.static voidshowEventTitleToPlayer(PlayerRef playerRefComponent, Message primaryTitle, Message secondaryTitle, EventTitleStyle style, String icon, float duration, float fadeInDuration, float fadeOutDuration) Show an event title to a specific player.static voidshowEventTitleToPlayer(PlayerRef playerRefComponent, EventTitleConfig config) Show an event title to a specific player.static voidshowEventTitleToUniverse(Message primaryTitle, Message secondaryTitle, boolean isMajor, String icon, float duration, float fadeInDuration, float fadeOutDuration) Deprecated, for removal: This API element is subject to removal in a future version.static voidshowEventTitleToUniverse(Message primaryTitle, Message secondaryTitle, EventTitleStyle style, String icon, float duration, float fadeInDuration, float fadeOutDuration) Show an event title to all worlds in the universe.static voidShow an event title to all worlds in the universe.static voidshowEventTitleToWorld(Message primaryTitle, Message secondaryTitle, boolean isMajor, String icon, float duration, float fadeInDuration, float fadeOutDuration, World world) Deprecated, for removal: This API element is subject to removal in a future version.static voidshowEventTitleToWorld(Message primaryTitle, Message secondaryTitle, EventTitleStyle style, String icon, float duration, float fadeInDuration, float fadeOutDuration, World world) Show an event title to all players in the world.static voidshowEventTitleToWorld(EventTitleConfig config, World world) Show an event title to all players in the world.
-
Field Details
-
DEFAULT_ZONE
-
DEFAULT_DURATION
public static final float DEFAULT_DURATIONThe default duration, in seconds, for an event title.- See Also:
-
DEFAULT_FADE_DURATION
public static final float DEFAULT_FADE_DURATIONThe default fade duration, in seconds, for an event title.- See Also:
-
-
Constructor Details
-
EventTitleUtil
public EventTitleUtil()
-
-
Method Details
-
showEventTitleToUniverse
@Deprecated(forRemoval=true) public static void showEventTitleToUniverse(@Nonnull Message primaryTitle, @Nullable Message secondaryTitle, boolean isMajor, @Nullable String icon, float duration, float fadeInDuration, float fadeOutDuration) Deprecated, for removal: This API element is subject to removal in a future version.Show an event title to all worlds in the universe.- Parameters:
primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.isMajor- Indicates whether the event title is major or minor.icon- The icon to display with the event title.duration- The duration to display the event title for, in seconds.fadeInDuration- The duration of the fade in, in seconds.fadeOutDuration- The duration of the fade out, in seconds.
-
showEventTitleToUniverse
public static void showEventTitleToUniverse(@Nonnull Message primaryTitle, @Nullable Message secondaryTitle, EventTitleStyle style, @Nullable String icon, float duration, float fadeInDuration, float fadeOutDuration) Show an event title to all worlds in the universe.- Parameters:
primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.style- TheEventTitleStylethat the client uses to present the event title.icon- The icon to display with the event title.nullshows no icon.duration- The duration to display the event title for, in seconds.fadeInDuration- The duration of the fade in, in seconds.fadeOutDuration- The duration of the fade out, in seconds.
-
showEventTitleToUniverse
Show an event title to all worlds in the universe.- Parameters:
config- TheEventTitleConfigthat describes the title.
-
showEventTitleToWorld
@Deprecated(forRemoval=true) public static void showEventTitleToWorld(@Nonnull Message primaryTitle, @Nonnull Message secondaryTitle, boolean isMajor, String icon, float duration, float fadeInDuration, float fadeOutDuration, @Nonnull World world) Deprecated, for removal: This API element is subject to removal in a future version.Show an event title to all players in the world.- Parameters:
primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.isMajor- Indicates whether the event title is major or minor.icon- The icon to display with the event title.duration- The duration to display the event title for, in seconds.fadeInDuration- The duration of the fade in, in seconds.fadeOutDuration- The duration of the fade out, in seconds.world- TheWorldwhose players receive the event title.
-
showEventTitleToWorld
public static void showEventTitleToWorld(@Nonnull Message primaryTitle, @Nullable Message secondaryTitle, EventTitleStyle style, @Nullable String icon, float duration, float fadeInDuration, float fadeOutDuration, @Nonnull World world) Show an event title to all players in the world.- Parameters:
primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.style- TheEventTitleStylethat the client uses to present the event title.icon- The icon to display with the event title.nullshows no icon.duration- The duration to display the event title for, in seconds.fadeInDuration- The duration of the fade in, in seconds.fadeOutDuration- The duration of the fade out, in seconds.world- TheWorldwhose players receive the event title.
-
showEventTitleToWorld
Show an event title to all players in the world.- Parameters:
config- TheEventTitleConfigthat describes the title.world- TheWorldwhose players receive the event title.
-
hideEventTitleFromWorld
-
showEventTitleToPlayer
@Deprecated(forRemoval=true) public static void showEventTitleToPlayer(@Nonnull PlayerRef playerRefComponent, @Nonnull Message primaryTitle, @Nonnull Message secondaryTitle, boolean isMajor, @Nullable String icon, float duration, float fadeInDuration, float fadeOutDuration) Deprecated, for removal: This API element is subject to removal in a future version.Show an event title to a specific player.- Parameters:
playerRefComponent- The reference to the player entity.primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.isMajor- Indicates whether the event title is major or minor.icon- The icon to display with the event title.duration- The duration to display the event title for.fadeInDuration- The duration of the fade in, in seconds.fadeOutDuration- The duration of the fade out, in seconds.
-
showEventTitleToPlayer
public static void showEventTitleToPlayer(@Nonnull PlayerRef playerRefComponent, @Nonnull Message primaryTitle, @Nullable Message secondaryTitle, EventTitleStyle style, @Nullable String icon, float duration, float fadeInDuration, float fadeOutDuration) Show an event title to a specific player.- Parameters:
playerRefComponent- ThePlayerRefof the player who receives the event title.primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.style- TheEventTitleStylethat the client uses to present the event title.icon- The icon to display with the event title.nullshows no icon.duration- The duration to display the event title for, in seconds.fadeInDuration- The duration of the fade in, in seconds.fadeOutDuration- The duration of the fade out, in seconds.
-
showEventTitleToPlayer
public static void showEventTitleToPlayer(@Nonnull PlayerRef playerRefComponent, @Nonnull EventTitleConfig config) Show an event title to a specific player.- Parameters:
playerRefComponent- ThePlayerRefof the player who receives the event title.config- TheEventTitleConfigthat describes the title.
-
showEventTitleToPlayer
@Deprecated(forRemoval=true) public static void showEventTitleToPlayer(@Nonnull PlayerRef playerRefComponent, @Nonnull Message primaryTitle, @Nonnull Message secondaryTitle, boolean isMajor) Deprecated, for removal: This API element is subject to removal in a future version.Show an event title to a specific player with default duration and fade durations.- Parameters:
playerRefComponent- The reference to the player entity.primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.isMajor- Indicates whether the event title is major or minor.
-
showEventTitleToPlayer
public static void showEventTitleToPlayer(@Nonnull PlayerRef playerRefComponent, @Nonnull Message primaryTitle, @Nonnull Message secondaryTitle, EventTitleStyle style) Show an event title to a specific player with default duration and fade durations. The title usesDEFAULT_DURATIONandDEFAULT_FADE_DURATION. The title has no icon.- Parameters:
playerRefComponent- ThePlayerRefof the player who receives the event title.primaryTitle- The primary title of the event title.secondaryTitle- The secondary title of the event title.style- TheEventTitleStylethat the client uses to present the event title.
-
hideEventTitleFromPlayer
public static void hideEventTitleFromPlayer(@Nonnull PlayerRef playerRefComponent, float fadeOutDuration) Hide the event title from a specific player.- Parameters:
playerRefComponent- The reference to the player entity.fadeOutDuration- The duration of the fade out, in seconds.
-
getDefaultFadeInDuration
Gets the default fade-in duration for an event title style.- Parameters:
style- TheEventTitleStyleto get the default fade-in duration for.- Returns:
- The default fade-in duration, in seconds.
-
showEventTitleToPlayer(PlayerRef, Message, Message, EventTitleStyle)instead.