Class BaseIOGUIPane<S extends BaseIOGUIPane<S>>
java.lang.Object
de.placeblock.betterinventories.content.GUISection
de.placeblock.betterinventories.content.pane.GUIPane
de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane<GUIItem,S>
de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleItemGUIPane<S>
de.placeblock.betterinventories.content.pane.impl.io.BaseIOGUIPane<S>
- Type Parameters:
S- The implementing class to return this-type correctly e.g.BaseSimpleGUIPane.addItemEmptySlot(GUIItem)
- All Implemented Interfaces:
Sizeable
- Direct Known Subclasses:
IOGUIPane,SynchedGUIPane
GUIPane which allows Items to be inserted and taken out
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBaseIOGUIPane.Builder<B extends BaseIOGUIPane.Builder<B,P>, P extends BaseIOGUIPane<P>> Builder forBaseIOGUIPaneNested classes/interfaces inherited from class de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane
BaseSimpleGUIPane.ChildData<C extends GUISection> -
Field Summary
Fields inherited from class de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane
autoSize, contentFields inherited from class de.placeblock.betterinventories.content.GUISection
maxSize, minSize -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseIOGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, boolean autoSize, boolean input, boolean output) Creates a new TransferGUIPane -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled when an item is added to an empty slotbooleanonItemAmount(Vector2d position, int amount) Called when the amount of an item in a slot changesabstract voidonItemChange(Vector2d position, org.bukkit.inventory.ItemStack itemStack) Called when an item changesvoidonItemProvide(org.bukkit.inventory.ItemStack itemStack) Called when an item is provided by an inventory MOVE_TO_OTHER_INVENTORY eventorg.bukkit.inventory.ItemStackonItemRemove(Vector2d position) Called when an item is removed from an empty slotMethods inherited from class de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleItemGUIPane
flipX, flipY, getItem, getItem, shiftX, shiftYMethods inherited from class de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane
addItemEmptySlot, clear, fill, getChildren, getNextEmptySlot, getSections, removeSection, removeSection, render, search, setSection, setSectionAt, setSectionAt, updateSize, updateSizeRecursiveMethods inherited from class de.placeblock.betterinventories.content.pane.GUIPane
onItemClick, onSizeChange, provideItem, renderOnList, setHeight, setSize, setWidth, updateChildrenRecursiveMethods inherited from class de.placeblock.betterinventories.content.GUISection
getEmptyContentList, getHeight, getSlots, getWidth, 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
-
BaseIOGUIPane
protected BaseIOGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, boolean autoSize, boolean input, boolean output) Creates a new TransferGUIPane- Parameters:
gui- The GUIminSize- The minimum size of the PanemaxSize- The maximum size of the PaneautoSize- Whether to automatically resize the pane according to the children. If true it will set the size to the bounding box of all children.input- Whether it should be allowed to input items into the IO-Pane.output- Whether it should be allowed to remove items from the IO-Pane.
-
-
Method Details
-
onItemAdd
Description copied from class:GUISectionCalled when an item is added to an empty slot -
onItemRemove
Description copied from class:GUISectionCalled when an item is removed from an empty slot- Overrides:
onItemRemovein classGUIPane- Parameters:
position- The relative position of the slot- Returns:
- Whether this action is allowed.
-
onItemAmount
Description copied from class:GUISectionCalled when the amount of an item in a slot changes- Overrides:
onItemAmountin classGUIPane- Parameters:
position- The relative position of the slotamount- The new amount of the item- Returns:
- Whether this action is allowed.
-
onItemProvide
public void onItemProvide(org.bukkit.inventory.ItemStack itemStack) Description copied from class:GUIPaneCalled when an item is provided by an inventory MOVE_TO_OTHER_INVENTORY event- Overrides:
onItemProvidein classBaseSimpleGUIPane<GUIItem,S extends BaseIOGUIPane<S>> - Parameters:
itemStack- The provided item. Method reduces the amount of the item by the number that got accepted.
-
onItemChange
Called when an item changes- Parameters:
position- The position of the item that changeditemStack- The new ItemStack
-