| Modifier | Constructor and Description |
|---|---|
protected |
Menu(String name,
int size) |
| Modifier and Type | Method and Description |
|---|---|
static Menu |
createMenu(String name,
int size) |
org.bukkit.inventory.Inventory |
inventory()
The inventory representation of this menu
|
Item |
itemAt(int index)
Returns the item at specified index
|
Item |
itemAt(int x,
int z)
Returns the item at specified coordinates, where x is on the horizontal axis and z is on the vertical axis.
|
String |
name()
The name of this menu, with translated color codes
|
void |
onClick(org.bukkit.event.inventory.InventoryClickEvent event) |
void |
onDrag(org.bukkit.event.inventory.InventoryDragEvent event) |
void |
onExit(org.bukkit.event.inventory.InventoryCloseEvent event) |
Menu |
setItem(int x,
int z,
Item item)
Sets the item at the specified coordinates, where x is on the horizontal axis and z is on the vertical axis.
|
Menu |
setItem(int index,
Item item)
Sets the item at the specified index
|
Menu |
setParent(Menu parent)
Sets the parent of the menu, used when the player exits the menu
|
void |
showTo(org.bukkit.entity.Player... players)
Show the menu to the inputted players
|
int |
size()
The size of this menu
|
protected Menu(String name, int size)
public String name()
public int size()
public org.bukkit.inventory.Inventory inventory()
public Item itemAt(int index)
index - public Item itemAt(int x, int z)
x - The x coordinatez - The z coordinatepublic Menu setItem(int index, Item item)
index - Index of the item you wish to setitem - The item you wish to set the index aspublic Menu setItem(int x, int z, Item item)
x - The x coordinatez - The z coordinateitem - The item you wish to set the index aspublic Menu setParent(Menu parent)
public void showTo(org.bukkit.entity.Player... players)
players - The players you wish to show the menu toopublic void onExit(org.bukkit.event.inventory.InventoryCloseEvent event)
public void onClick(org.bukkit.event.inventory.InventoryClickEvent event)
public void onDrag(org.bukkit.event.inventory.InventoryDragEvent event)
Copyright © 2015. All rights reserved.