Package de.studiocode.invui.item.impl
Class AutoCycleItem
java.lang.Object
de.studiocode.invui.item.impl.BaseItem
de.studiocode.invui.item.impl.AutoCycleItem
- All Implemented Interfaces:
Item
An
Item that automatically cycles through a predefined array of
ItemProvider at a predefined speed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcancel()Gets theItemProvider.voidhandleClick(@NotNull org.bukkit.event.inventory.ClickType clickType, @NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.event.inventory.InventoryClickEvent event) A method called if the theItemStackassociated to thisItemhas been clicked by a player.voidremoveWindow(Window window) voidstart()Methods inherited from class de.studiocode.invui.item.impl.BaseItem
getWindows, notifyWindows
-
Constructor Details
-
AutoCycleItem
-
-
Method Details
-
start
public void start() -
cancel
public void cancel() -
getItemProvider
Description copied from interface:ItemGets theItemProvider. This method gets called every time aWindowis notified (Item.notifyWindows()).- Returns:
- The
ItemProvider
-
addWindow
Description copied from interface:Item -
removeWindow
Description copied from interface:ItemRemoves anWindowfrom the window set, telling theItemthat it is no longer being displayed in thatWindow.- Specified by:
removeWindowin interfaceItem- Overrides:
removeWindowin classBaseItem- Parameters:
window- TheWindowtheItemis no longer displayed in.
-
handleClick
public void handleClick(@NotNull @NotNull org.bukkit.event.inventory.ClickType clickType, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent event) Description copied from interface:ItemA method called if the theItemStackassociated to thisItemhas been clicked by a player.- Parameters:
clickType- TheClickTypethePlayerdid.player- ThePlayerwho clicked on theItemStackevent- TheInventoryClickEventassociated with this click.
-