Class GUIButton.AbstractBuilder<B extends GUIButton.AbstractBuilder<B,P>,P extends GUIButton>
java.lang.Object
de.placeblock.betterinventories.Builder<B,P>
de.placeblock.betterinventories.content.GUISection.AbstractBuilder<B,P>
de.placeblock.betterinventories.content.item.GUIItem.AbstractBuilder<B,P>
de.placeblock.betterinventories.content.item.GUIButton.AbstractBuilder<B,P>
- Type Parameters:
B- The Builder that implements this oneP- TheGUIButtonthat is built
- Direct Known Subclasses:
CommandGUIButton.AbstractBuilder,CycleGUIButton.Builder,GUIButton.Builder,PaginatorGUIButton.AbstractBuilder,SubmitGUIButton.AbstractBuilder,SwitchGUIButton.AbstractBuilder,TeleportGUIButton.AbstractBuilder,ToggleGUIButton.AbstractBuilder
- Enclosing class:
- GUIButton
protected abstract static class GUIButton.AbstractBuilder<B extends GUIButton.AbstractBuilder<B,P>,P extends GUIButton>
extends GUIItem.AbstractBuilder<B,P>
Abstract Builder for creating various
GUIButton-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncooldown(int cooldown) Sets the cooldown attributeSets the onClick attributeonLeftClick(Consumer<ClickData> onLeftClick) Sets the onLeftClick attributeonRightClick(Consumer<ClickData> onRightClick) Sets the onShiftClick attributeonShiftClick(Consumer<ClickData> onShiftClick) Sets the onShiftClick attributeonShiftLeftClick(Consumer<ClickData> onShiftLeftClick) Sets the onShiftLeftClick attributeonShiftRightClick(Consumer<ClickData> onShiftRightClick) Sets the onShiftRightClick attributepermission(String permission) Sets the permission attributesound(org.bukkit.Sound sound) Sets the sound attributeMethods inherited from class de.placeblock.betterinventories.content.item.GUIItem.AbstractBuilder
itemStackMethods inherited from class de.placeblock.betterinventories.content.GUISection.AbstractBuilder
adoptMinMax, getMaxSize, getMinSize, maxSize, maxSize, minSize, minSize, size, size
-
Constructor Details
-
AbstractBuilder
Creates a new Builder- Parameters:
gui- The GUI this Pane belongs to
-
-
Method Details
-
permission
Sets the permission attribute- Parameters:
permission- The permission that is required to click on the button- Returns:
- Itself
-
cooldown
Sets the cooldown attribute- Parameters:
cooldown- The cooldown after which the button can be pressed again- Returns:
- Itself
-
sound
Sets the sound attribute- Parameters:
sound- The sound which is played when the button is pressed- Returns:
- Itself
-
onClick
Sets the onClick attribute- Parameters:
callback- Gets executed when the button is clicked- Returns:
- Itself
-
onShiftClick
Sets the onShiftClick attribute- Parameters:
onShiftClick- Gets executed when the button is shift-clicked- Returns:
- Itself
-
onRightClick
Sets the onShiftClick attribute- Parameters:
onRightClick- Gets executed when the button is right-clicked- Returns:
- Itself
-
onLeftClick
Sets the onLeftClick attribute- Parameters:
onLeftClick- Gets executed when the button is left-clicked- Returns:
- Itself
-
onShiftRightClick
Sets the onShiftRightClick attribute- Parameters:
onShiftRightClick- Gets executed when the button is shift-right-clicked- Returns:
- Itself
-
onShiftLeftClick
Sets the onShiftLeftClick attribute- Parameters:
onShiftLeftClick- Gets executed when the button is shift-left-clicked- Returns:
- Itself
-