Package xyz.xenondevs.invui.item.impl
Class AutoUpdateItem
java.lang.Object
xyz.xenondevs.invui.item.impl.AbstractItem
xyz.xenondevs.invui.item.impl.SuppliedItem
xyz.xenondevs.invui.item.impl.AutoUpdateItem
- All Implemented Interfaces:
Item
An
Item
that updates its ItemProvider
every specified amount
of ticks.-
Constructor Summary
ConstructorDescriptionAutoUpdateItem
(int period, Supplier<? extends ItemProvider> builderSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addWindow
(AbstractWindow window) Adds anAbstractWindow
to the window set, telling theItem
that it is currently being displayed in thatAbstractWindow
.void
cancel()
void
removeWindow
(AbstractWindow window) Removes anAbstractWindow
from the window set, telling theItem
that it is no longer being displayed in thatAbstractWindow
.void
start()
Methods inherited from class xyz.xenondevs.invui.item.impl.SuppliedItem
getItemProvider, handleClick
Methods inherited from class xyz.xenondevs.invui.item.impl.AbstractItem
getWindows, notifyWindows
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xyz.xenondevs.invui.item.Item
getItemProvider
-
Constructor Details
-
AutoUpdateItem
-
-
Method Details
-
start
public void start() -
cancel
public void cancel() -
addWindow
Description copied from interface:Item
Adds anAbstractWindow
to the window set, telling theItem
that it is currently being displayed in thatAbstractWindow
.- Specified by:
addWindow
in interfaceItem
- Overrides:
addWindow
in classAbstractItem
- Parameters:
window
- TheAbstractWindow
theItem
is currently displayed in.
-
removeWindow
Description copied from interface:Item
Removes anAbstractWindow
from the window set, telling theItem
that it is no longer being displayed in thatAbstractWindow
.- Specified by:
removeWindow
in interfaceItem
- Overrides:
removeWindow
in classAbstractItem
- Parameters:
window
- TheAbstractWindow
theItem
is no longer displayed in.
-