Class CycleGUIButton<E extends CycleEnum>
java.lang.Object
de.placeblock.betterinventories.content.GUISection
de.placeblock.betterinventories.content.item.GUIItem
de.placeblock.betterinventories.content.item.GUIButton
de.placeblock.betterinventories.content.item.impl.cyclebutton.CycleGUIButton<E>
- Type Parameters:
E- The Enum
- All Implemented Interfaces:
Sizeable
GUIButton which cycles through values of an Enum
-
Nested Class Summary
Nested classes/interfaces inherited from class de.placeblock.betterinventories.content.GUISection
GUISection.SearchData -
Field Summary
Fields inherited from class de.placeblock.betterinventories.content.item.GUIItem
BUTTON_SIZE, itemStackFields inherited from class de.placeblock.betterinventories.content.GUISection
maxSize, minSize -
Constructor Summary
ConstructorsConstructorDescriptionCycleGUIButton(GUI gui, E[] values) Creates a new CycleGUIButtonCycleGUIButton(GUI gui, E[] values, E startValue) Creates a new CycleGUIButton -
Method Summary
Modifier and TypeMethodDescriptionvoidCycles the Valuesprotected org.bukkit.inventory.ItemStackReturns the Item to be displayed for an Enum-value Can be overridden for modifying Enum-Item-conversionprotected abstract voidIs called when cycling through the Enum-valuesMethods inherited from class de.placeblock.betterinventories.content.item.GUIButton
applyCooldown, click, hasPermission, onClick, onItemClick, onLeftClick, onRightClick, onShiftClick, onShiftLeftClick, onShiftRightClick, setCooldownMethods inherited from class de.placeblock.betterinventories.content.item.GUIItem
onItemAdd, onItemAmount, onItemRemove, render, search, searchMethods inherited from class de.placeblock.betterinventories.content.GUISection
getEmptyContentList, getHeight, getSlots, getWidth, setSize, slotToVector, vectorToSlotMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.placeblock.betterinventories.Sizeable
clampSize, getMaxSize, getMinSize, getSize
-
Constructor Details
-
CycleGUIButton
Creates a new CycleGUIButton- Parameters:
gui- The GUIvalues- The Enum values
-
CycleGUIButton
Creates a new CycleGUIButton- Parameters:
gui- The GUIvalues- The Enum valuesstartValue- The Start-value
-
-
Method Details
-
getItem
Returns the Item to be displayed for an Enum-value Can be overridden for modifying Enum-Item-conversion- Parameters:
value- The Enum-value- Returns:
- The according ItemStack
-
cycle
Cycles the Values- Parameters:
data- The clickData if the click event
-
onCycle
Is called when cycling through the Enum-values- Parameters:
data- The ClickDatanewValue- The new Enum-value
-