Package net.md_5.bungee.api.chat
Class HoverEvent
java.lang.Object
net.md_5.bungee.api.chat.HoverEvent
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionHoverEvent
(HoverEvent.Action action, List<Content> contents) HoverEvent
(HoverEvent.Action action, BaseComponent[] value) Deprecated.HoverEvent
(HoverEvent.Action action, Content... contents) Creates event with an action and a list of contents. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContent
(Content content) Adds a content to this hover event.boolean
The action of this event.static Class<?>
getClass
(HoverEvent.Action action, boolean array) Gets the appropriateContent
class for anHoverEvent.Action
for the GSON serializationList of contents to provide for this event.getValue()
Deprecated.int
hashCode()
boolean
isLegacy()
Returns whether this hover event is prior to 1.16void
setLegacy
(boolean legacy) Returns whether this hover event is prior to 1.16toString()
-
Constructor Details
-
HoverEvent
Creates event with an action and a list of contents.- Parameters:
action
- action of this eventcontents
- array of contents, provide at least one
-
HoverEvent
Deprecated.Legacy constructor to create hover event.- Parameters:
action
- the actionvalue
- the value
-
HoverEvent
-
-
Method Details
-
getValue
Deprecated. -
addContent
Adds a content to this hover event.- Parameters:
content
- the content add- Throws:
IllegalArgumentException
- if is a legacy component and already has a contentUnsupportedOperationException
- if content action does not match hover event action
-
getClass
Gets the appropriateContent
class for anHoverEvent.Action
for the GSON serialization- Parameters:
action
- the action to get forarray
- if to return the arrayed class- Returns:
- the class
-
getAction
The action of this event. -
getContents
List of contents to provide for this event. -
isLegacy
public boolean isLegacy()Returns whether this hover event is prior to 1.16 -
toString
-
equals
-
hashCode
public int hashCode() -
setLegacy
public void setLegacy(boolean legacy) Returns whether this hover event is prior to 1.16
-
HoverEvent(Action, Content[])