Package me.hsgamer.bettergui.api.button
Class BaseWrappedButton<B extends Button>
- java.lang.Object
-
- me.hsgamer.bettergui.api.button.BaseWrappedButton<B>
-
- All Implemented Interfaces:
WrappedButton
,MenuElement
,Button
,Initializable
- Direct Known Subclasses:
ActionButton
,EmptyButton
,LegacyMenuButton
,TemplateButton
,WrappedAnimatedButton
,WrappedDummyButton
,WrappedListButton
,WrappedPredicateButton
public abstract class BaseWrappedButton<B extends Button> extends Object implements WrappedButton
The base class of wrapped button
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseWrappedButton(ButtonBuilder.Input input)
Create a new wrapped button
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract B
createButton(Map<String,Object> section)
Create the button from the section@Nullable DisplayButton
display(@NotNull UUID uuid)
Menu
getMenu()
Get the menu containing the elementString
getName()
Get the name of the buttonMap<String,Object>
getOptions()
Get the options of the buttonvoid
init()
void
stop()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface me.hsgamer.bettergui.api.button.WrappedButton
refresh
-
-
-
-
Constructor Detail
-
BaseWrappedButton
protected BaseWrappedButton(ButtonBuilder.Input input)
Create a new wrapped button- Parameters:
input
- the input
-
-
Method Detail
-
createButton
protected abstract B createButton(Map<String,Object> section)
Create the button from the section- Parameters:
section
- the section- Returns:
- the button
-
getOptions
public Map<String,Object> getOptions()
Get the options of the button- Returns:
- the options
-
getName
public String getName()
Description copied from interface:WrappedButton
Get the name of the button- Specified by:
getName
in interfaceWrappedButton
- Returns:
- the name
-
getMenu
public Menu getMenu()
Description copied from interface:MenuElement
Get the menu containing the element- Specified by:
getMenu
in interfaceMenuElement
- Returns:
- the menu
-
display
@Nullable public @Nullable DisplayButton display(@NotNull @NotNull UUID uuid)
-
init
public void init()
- Specified by:
init
in interfaceInitializable
-
stop
public void stop()
- Specified by:
stop
in interfaceInitializable
-
-