Package xyz.gmitch215.socketmc.screen
Class DefaultScreen
java.lang.Object
xyz.gmitch215.socketmc.screen.AbstractScreen
xyz.gmitch215.socketmc.screen.DefaultScreen
- All Implemented Interfaces:
Serializable
,Narratable
,DataHolder
Represents default screens built-in to the client.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DefaultScreen
Represents the advancements screen.static final DefaultScreen
Represents the options menu.static final DefaultScreen
Represents the pause menu.static final DefaultScreen
Represents the share to Local-Access-Network (LAN) menu.static final DefaultScreen
Represents the player statistics screen.static final DefaultScreen
Represents the title screen. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull DefaultScreen
Creates a new alert menu.static @NotNull DefaultScreen
Creates a new alert menu.static @NotNull DefaultScreen
death()
Creates a new death screen.static @NotNull DefaultScreen
Creates a new death screen.static @NotNull DefaultScreen
Creates a new death screen.static @NotNull DefaultScreen
disconnected
(@NotNull Text title, @NotNull Text reason) Creates a new disconnected screen.static @NotNull DefaultScreen
Creates a new disconnected screen.static @NotNull DefaultScreen
Creates a new error screen.static @NotNull Set
<DefaultScreen> Gets all the default screens built-in to the client.getData()
Gets an immutable copy for the data for this object.Gets the identifier for this default screen.Gets the title of this screen.static @NotNull DefaultScreen
Creates a new message screen.toString()
Methods inherited from class xyz.gmitch215.socketmc.screen.AbstractScreen
fromByteArray, getNarrationMessageJSON, toByteArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface xyz.gmitch215.socketmc.util.DataHolder
data, data, data, data
-
Field Details
-
TITLE
Represents the title screen. -
PAUSE
Represents the pause menu. -
OPTIONS
Represents the options menu. -
SHARE_TO_LAN
Represents the share to Local-Access-Network (LAN) menu. -
ADVANCEMENTS
Represents the advancements screen. -
STATS
Represents the player statistics screen.
-
-
Method Details
-
getIdentifier
Gets the identifier for this default screen.- Returns:
- Screen Identifier
-
getData
Description copied from interface:DataHolder
Gets an immutable copy for the data for this object.- Specified by:
getData
in interfaceDataHolder
- Returns:
- Screen Data
-
getTitleJSON
Description copied from class:AbstractScreen
Gets the title of this screen.- Specified by:
getTitleJSON
in classAbstractScreen
- Returns:
- Title in JSON Format
-
alert
@NotNull public static @NotNull DefaultScreen alert(@NotNull @NotNull Text title, @NotNull @NotNull Text message) throws IllegalArgumentException Creates a new alert menu.- Parameters:
title
- Menu Titlemessage
- Alert Message- Returns:
- Alert Menu
- Throws:
IllegalArgumentException
- if title or message are null
-
alert
@NotNull public static @NotNull DefaultScreen alert(@NotNull @NotNull Text title, @NotNull @NotNull Text message, @Nullable @Nullable Text button) throws IllegalArgumentException Creates a new alert menu.- Parameters:
title
- Menu Titlemessage
- Alert Messagebutton
- OK Button Text- Returns:
- Alert Menu
- Throws:
IllegalArgumentException
- if title or message are null
-
disconnected
@NotNull public static @NotNull DefaultScreen disconnected(@NotNull @NotNull Text title, @NotNull @NotNull Text reason) throws IllegalArgumentException Creates a new disconnected screen.- Parameters:
title
- Screen Titlereason
- Disconnection Reason- Returns:
- Disconnected Screen
- Throws:
IllegalArgumentException
- if title or reason are null
-
disconnected
@NotNull public static @NotNull DefaultScreen disconnected(@NotNull @NotNull Text title, @NotNull @NotNull Text reason, @Nullable @Nullable Text button) throws IllegalArgumentException Creates a new disconnected screen.- Parameters:
title
- Screen Titlereason
- Disconnection Reasonbutton
- Return Button Text- Returns:
- Disconnected Screen
- Throws:
IllegalArgumentException
- if title or reason are null
-
message
@NotNull public static @NotNull DefaultScreen message(@NotNull @NotNull Text message) throws IllegalArgumentException Creates a new message screen.- Parameters:
message
- Message to Display- Returns:
- Message Screen
- Throws:
IllegalArgumentException
- if message is null
-
death
Creates a new death screen.- Returns:
- Death Screen
-
death
Creates a new death screen.- Parameters:
causeOfDeath
- Cause of Death- Returns:
- Death Screen
-
death
@NotNull public static @NotNull DefaultScreen death(@Nullable @Nullable Text causeOfDeath, boolean hardcore) Creates a new death screen.- Parameters:
causeOfDeath
- Cause of Deathhardcore
- Whether they died in hardcore mode- Returns:
- Death Screen
-
error
@NotNull public static @NotNull DefaultScreen error(@NotNull @NotNull Text title, @NotNull @NotNull Text message) throws IllegalArgumentException Creates a new error screen.- Parameters:
title
- Screen Titlemessage
- Error Message- Returns:
- Error Screen
- Throws:
IllegalArgumentException
- if title or message are null
-
getAllScreens
Gets all the default screens built-in to the client.- Returns:
- Default Screens
-
toString
-