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, 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.static Class<?>
getClass
(HoverEvent.Action action, boolean array) Gets the appropriateContent
class for anHoverEvent.Action
for the GSON serializationgetValue()
Deprecated.
-
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
-
-
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
-
HoverEvent(Action, Content[])