Class Tooltip
java.lang.Object
xyz.gmitch215.socketmc.screen.util.Tooltip
- All Implemented Interfaces:
 Serializable,Narratable
Represents a Tooltip message.
- See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionTooltip()Constructs a new, empty Tooltip.Constructs a new Tooltip.Constructs a new Tooltip.Constructs a new Tooltip. - 
Method Summary
Modifier and TypeMethodDescriptionGets the JSON message that represents the narration of this element.Gets the JSON representation for this tooltip.voidsetNarrationMessage(@NotNull Text narrationMessage) Sets the Narration Message for this Tooltip.voidsetNarrationMessageJSON(@NotNull String narrationMessageJSON) Sets the Narration Message JSON for this Tooltip.voidsetTooltip(@NotNull Text tooltip) Sets the tooltip message for this Tooltip.voidsetTooltipJSON(@NotNull String tooltipJSON) Sets the tooltip message JSON for this Tooltip. 
- 
Constructor Details
- 
Tooltip
public Tooltip()Constructs a new, empty Tooltip. - 
Tooltip
Constructs a new Tooltip.- Parameters:
 tooltip- Tooltip Message- Throws:
 IllegalArgumentException- if tooltip is null
 - 
Tooltip
public Tooltip(@NotNull @NotNull Text tooltip, @NotNull @NotNull Text narratableMessage) throws IllegalArgumentException Constructs a new Tooltip.- Parameters:
 tooltip- Tooltip MessagenarratableMessage- Narration Message- Throws:
 IllegalArgumentException- if tooltip or narratableMessage is null
 - 
Tooltip
public Tooltip(@NotNull @NotNull String tooltipJSON, @NotNull @NotNull String narrationMessageJSON) throws IllegalArgumentException Constructs a new Tooltip.- Parameters:
 tooltipJSON- Tooltip Message JSONnarrationMessageJSON- Narration Message JSON- Throws:
 IllegalArgumentException- if tooltipJSON or narrationMessageJSON is null
 
 - 
 - 
Method Details
- 
getTooltipJSON
Gets the JSON representation for this tooltip.- Returns:
 - JSON Representation
 
 - 
setTooltip
Sets the tooltip message for this Tooltip.- Parameters:
 tooltip- Tooltip Message
 - 
setTooltipJSON
Sets the tooltip message JSON for this Tooltip.- Parameters:
 tooltipJSON- Tooltip Message JSON- Throws:
 IllegalArgumentException- if tooltipJSON is null
 - 
getNarrationMessageJSON
Description copied from interface:NarratableGets the JSON message that represents the narration of this element. By default, this is the title of the element.- Specified by:
 getNarrationMessageJSONin interfaceNarratable- Returns:
 - the JSON message
 
 - 
setNarrationMessage
public void setNarrationMessage(@NotNull @NotNull Text narrationMessage) throws IllegalArgumentException Sets the Narration Message for this Tooltip.- Parameters:
 narrationMessage- Narration Message- Throws:
 IllegalArgumentException- if narrationMessage is null
 - 
setNarrationMessageJSON
public void setNarrationMessageJSON(@NotNull @NotNull String narrationMessageJSON) throws IllegalArgumentException Sets the Narration Message JSON for this Tooltip.- Parameters:
 narrationMessageJSON- Narration Message JSON- Throws:
 IllegalArgumentException- if narrationMessageJSON is null
 
 -