Class Action
java.lang.Object
com.kamikazejam.kamicommon.actions.StandaloneAction
com.kamikazejam.kamicommon.actions.Action
public class Action
extends com.kamikazejam.kamicommon.actions.StandaloneAction
Wrapper class for basic expression of chat message actions.
Extends StandaloneAction, adds hover item chat action
HoverItem
-
Field Summary
Fields inherited from class com.kamikazejam.kamicommon.actions.StandaloneAction
click, hover
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetClickOpenURL
(@NotNull String url) setClickRunCommand
(@NotNull String command) Note: the command does not need to start with a slash (/).setClickSuggestCommand
(@NotNull String suggestion) setHoverItem
(@NotNull ItemStack item) setHoverText
(@NotNull String text) Methods inherited from class com.kamikazejam.kamicommon.actions.StandaloneAction
getClick, getHover, getPlaceholder, getReplacement
-
Constructor Details
-
Action
Create a new empty Action with a placeholder and its replacement text.
Use setters to add actions to this object.- Parameters:
placeholder
- The placeholder in the message string to replacereplacement
- The text to replace the placeholder with
-
-
Method Details
-
setHoverItem
- Parameters:
item
- TheItemStack
to show when hovering over this action's text
-
setClickRunCommand
Note: the command does not need to start with a slash (/). It will be automatically added if necessary.- Overrides:
setClickRunCommand
in classcom.kamikazejam.kamicommon.actions.StandaloneAction
- Parameters:
command
- The command to run, when this action's text is clicked.
-
setClickSuggestCommand
- Overrides:
setClickSuggestCommand
in classcom.kamikazejam.kamicommon.actions.StandaloneAction
- Parameters:
suggestion
- The chatbox text to suggest to the player, when this action's text is clicked
-
setClickOpenURL
- Overrides:
setClickOpenURL
in classcom.kamikazejam.kamicommon.actions.StandaloneAction
- Parameters:
url
- The url to open, when this action's text is clicked
-
setHoverText
- Overrides:
setHoverText
in classcom.kamikazejam.kamicommon.actions.StandaloneAction
- Parameters:
text
- The text to show when this action's text is hovered over
-