Package net.md_5.bungee.api.event
Class CustomClickEvent
- java.lang.Object
-
- net.md_5.bungee.api.plugin.Event
-
- net.md_5.bungee.api.event.CustomClickEvent
-
- All Implemented Interfaces:
Cancellable
public class CustomClickEvent extends Event implements Cancellable
Called after aProxiedPlayerruns a custom action from a chat event or form submission.
-
-
Field Summary
Fields Modifier and Type Field Description static StringACTION_KEYMap key containing the form action, if available.
-
Constructor Summary
Constructors Constructor Description CustomClickEvent(ProxiedPlayer player, String id, Map<String,String> data)Creates a newCustomClickEventinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)Map<String,String>getData()Form data, may be null.StringgetId()Custom action ID.ProxiedPlayergetPlayer()Player who clicked.inthashCode()booleanisCancelled()Cancelled state.voidsetCancelled(boolean cancelled)Cancelled state.StringtoString()
-
-
-
Field Detail
-
ACTION_KEY
public static final String ACTION_KEY
Map key containing the form action, if available.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CustomClickEvent
public CustomClickEvent(ProxiedPlayer player, String id, Map<String,String> data)
Creates a newCustomClickEventinstance.- Parameters:
player- Player who clicked.id- Custom action ID.data- Form data, may be null. If a form submission, usually contains aCustomClickEvent.ACTION_KEYkey with the ID of the relevant submission action.
-
-
Method Detail
-
getPlayer
public ProxiedPlayer getPlayer()
Player who clicked.
-
getId
public String getId()
Custom action ID.
-
getData
public Map<String,String> getData()
Form data, may be null. If a form submission, usually contains aCustomClickEvent.ACTION_KEYkey with the ID of the relevant submission action.
-
isCancelled
public boolean isCancelled()
Cancelled state.- Specified by:
isCancelledin interfaceCancellable- Returns:
- the cancelled state of this event
-
setCancelled
public void setCancelled(boolean cancelled)
Cancelled state.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancelled- the state to set
-
canEqual
protected boolean canEqual(Object other)
-
-