Package kr.toxicity.hud.api.popup
Interface Popup
- All Superinterfaces:
HudObject
Represents popup.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface kr.toxicity.hud.api.configuration.HudObject
HudObject.Identifier -
Method Summary
Modifier and TypeMethodDescription@NotNull Popup.FrameTypeGets a frame type.@NotNull StringGets a group name of popup.default intGets a last index of the popup.intGets a popup's max stack sizedefault booleanHides popup to some player.@Nullable PopupUpdatershow(@NotNull UpdateEvent reason, @NotNull HudPlayer player) Shows popup to some player.Methods inherited from interface kr.toxicity.hud.api.configuration.HudObject
add, getComponentsByType, getName, getType, identifier, isDefault, remove, tick
-
Method Details
-
getGroupName
Gets a group name of popup.- Returns:
- group name.
-
getMaxStack
int getMaxStack()Gets a popup's max stack size- Returns:
- max stack size
-
show
@Nullable @Nullable PopupUpdater show(@NotNull @NotNull UpdateEvent reason, @NotNull @NotNull HudPlayer player) Shows popup to some player.- Parameters:
reason- causesplayer- target player- Returns:
- updater of popup or null if showing has failed.
-
hide
Hides popup to some player.- Parameters:
player- target player- Returns:
- whether to success
-
getLastIndex
default int getLastIndex()Gets a last index of the popup. It equals getMaxStack() - 1- Returns:
- last index
-
frameType
Gets a frame type.- Returns:
- frame type
-