public class VisualGUI extends Object implements InventoryGUI, CompleteListener
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | editable | 
| protected boolean | finished | 
| protected Inventory | inventory | 
| protected String[] | layout | 
| protected HashMap<Character,ItemStack> | layoutMap | 
| protected TreeMap<Integer,BiConsumer<Player,InventoryClickEvent>> | map | 
| protected List<Player> | players | 
| protected Plugin | plugin | 
| protected List<Consumer<?>> | preActionConsumers | 
| Constructor and Description | 
|---|
| VisualGUI(Plugin plugin,
         int size,
         String title) | 
| VisualGUI(Plugin plugin,
         InventoryType type,
         String title) | 
| Modifier and Type | Method and Description | 
|---|---|
| VisualGUI | createButton(char ch,
            @NotNull ItemStack itemStack,
            @NotNull BiConsumer<Player,InventoryClickEvent> consumer) | 
| VisualGUI | createTile(char ch,
          @NotNull ItemStack itemStack) | 
| VisualGUI | createTile(char ch,
          ItemStack itemStack,
          boolean stealable) | 
| void | finalise() | 
| String[] | getLayout() | 
| @NotNull ItemStack | getReference(char ch) | 
| int | getSize() | 
| int[] | getSlots(char ch) | 
| InventoryType | getType() | 
| protected boolean | hasListener() | 
| boolean | isEditable() | 
| boolean | isOpen(Player player) | 
| void | onClick(InventoryClickEvent event) | 
| void | onClose(InventoryCloseEvent event) | 
| void | open(Player player) | 
| protected void | remove() | 
| VisualGUI | setLayout(String[] layout) | 
| void | unregister() | 
protected final Inventory inventory
protected final TreeMap<Integer,BiConsumer<Player,InventoryClickEvent>> map
protected final boolean editable
protected final Plugin plugin
protected boolean finished
protected String[] layout
public VisualGUI(Plugin plugin, InventoryType type, String title)
public String[] getLayout()
@NotNull public @NotNull ItemStack getReference(char ch)
public int[] getSlots(char ch)
public void unregister()
public int getSize()
getSize in interface InventoryGUIpublic VisualGUI createButton(char ch, @NotNull @NotNull ItemStack itemStack, @NotNull @NotNull BiConsumer<Player,InventoryClickEvent> consumer)
public void finalise()
public boolean isEditable()
isEditable in interface InventoryGUIpublic InventoryType getType()
getType in interface InventoryGUIpublic void onClick(InventoryClickEvent event)
public void onClose(InventoryCloseEvent event)
protected void remove()
protected boolean hasListener()
Copyright © 2020. All rights reserved.