Class LayoutMaker
java.lang.Object
ua.mcchickenstudio.opencreative.menus.AbstractMenu
ua.mcchickenstudio.opencreative.coding.menus.layouts.Layout
ua.mcchickenstudio.opencreative.coding.menus.layouts.LayoutMaker
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder, InventoryMenu
LayoutMaker
This class represents a maker for coding container layout. Sets glasses and argument slots.-
Field Summary
Fields inherited from class Layout
actionType, argsSlots, parameterButtons, requiredSlotsModifier and TypeFieldDescriptionprotected final ActionTypeprotected final List<ParameterButton> protected final ArgumentSlot[]Fields inherited from class AbstractMenu
AIR_ITEM, creationTime, DECORATION_ITEM, DECORATION_PANE_ITEM, DISABLED_ITEM, inventory, NO_PERMS_ITEMModifier and TypeFieldDescriptionprotected final org.bukkit.inventory.ItemStackprotected final longprotected final org.bukkit.inventory.ItemStackprotected final org.bukkit.inventory.ItemStackprotected final org.bukkit.inventory.ItemStackprotected org.bukkit.inventory.Inventoryprotected final org.bukkit.inventory.ItemStack -
Constructor Summary
ConstructorsConstructorDescriptionLayoutMaker(@NotNull ActionType action, @NotNull org.bukkit.block.Block chestBlock) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidFills menu with argument glasses and values.Methods inherited from class Layout
createParamButton, fillItems, getArgsSlots, getArgumentValueFromContainer, getCentredSlots, getViewers, onClick, onClose, onOpen, setArgSlot, setArgSlotCross, setArgSlotHorizontal, setArgSlotVertical, setGlassModifier and TypeMethodDescriptionprotected @NotNull ParameterButtoncreateParamButton(@NotNull ParameterSlot parameter, Object value) Creates and returns parameter button.voidfillItems(org.bukkit.entity.Player player) Returns list of slots, items from will be saved into coding container after closing menu.protected @NotNull org.bukkit.inventory.ItemStackgetArgumentValueFromContainer(int slot) Returns argument value item from coding container.getCentredSlots(int count, int row) Returns list of slots, that will be used to display a row of items in more beautiful place.@NotNull Set<org.bukkit.entity.Player> Returns set of players, who have opened this menu.voidonClick(@NotNull org.bukkit.event.inventory.InventoryClickEvent event) Executes when player clicks in inventory.final voidonClose(@NotNull org.bukkit.event.inventory.InventoryCloseEvent event) Executes when player closes inventory.voidonOpen(@NotNull org.bukkit.event.inventory.InventoryOpenEvent event) Executes when player opens inventory and sees it first time.protected voidsetArgSlot(int argNumber, int... slots) Sets argument slot in slot.protected voidsetArgSlotCross(int argNumber, int slot) Sets argument slot with vertical and horizontal glass panes in slot.protected voidsetArgSlotHorizontal(int argNumber, int slot) Sets argument slot with horizontal glass panes in slot.protected voidsetArgSlotVertical(int argNumber, int slot) Sets argument slot with vertical glass panes in slot.protected voidsetGlass(int argNumber, int... slots) Sets glass pane in slot.Methods inherited from class AbstractMenu
getCreationTime, getInventory, getItem, getRows, getSize, getTitle, isClickedInMenuSlots, isNotEmpty, isPlayerClicked, open, reverse, setItem, setItem, setRows, setTitleModifier and TypeMethodDescriptionlongReturns the creation time of menu in milliseconds of Unix format.@NotNull org.bukkit.inventory.Inventory@NotNull org.bukkit.inventory.ItemStackgetItem(int slot) intgetRows()intgetSize()getTitle()protected final booleanisClickedInMenuSlots(org.bukkit.event.inventory.InventoryClickEvent event) protected booleanisNotEmpty(org.bukkit.inventory.ItemStack item) protected final booleanisPlayerClicked(org.bukkit.event.inventory.InventoryClickEvent event) voidopen(@NotNull org.bukkit.entity.Player player) Opens the inventory for player.protected intreverse(int slot) voidsetItem(int slot, org.bukkit.inventory.ItemStack item) voidsetItem(org.bukkit.inventory.ItemStack item, int... slots) protected voidsetRows(int rows) voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InventoryMenu
destroyModifier and TypeMethodDescriptiondefault voiddestroy()Destroys menus from memory and disables all event listeners for it.
-
Constructor Details
-
LayoutMaker
public LayoutMaker(@NotNull @NotNull ActionType action, @NotNull @NotNull org.bukkit.block.Block chestBlock)
-
-
Method Details
-
fillArgumentItems
protected void fillArgumentItems()Description copied from class:LayoutFills menu with argument glasses and values.- Specified by:
fillArgumentItemsin classLayout- See Also:
-