Package net.md_5.bungee.api.chat
Class HoverEvent
java.lang.Object
net.md_5.bungee.api.chat.HoverEvent
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHoverEvent(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 TypeMethodDescriptionvoidaddContent(Content content) Adds a content to this hover event.static Class<?> getClass(HoverEvent.Action action, boolean array) Gets the appropriateContentclass for anHoverEvent.Actionfor the GSON serialization
-
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
-
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 appropriateContentclass for anHoverEvent.Actionfor the GSON serialization- Parameters:
action- the action to get forarray- if to return the arrayed class- Returns:
- the class
-
HoverEvent(Action, Content[])