|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.quartercode.quarterbukkit.api.select.SelectInventory
public abstract class SelectInventory
This class is for simple creating of custom selection Inventorys.
You can define your own titles using ChatColors and sort your selections in the Inventory.
| Constructor Summary | |
|---|---|
SelectInventory(org.bukkit.plugin.Plugin plugin)
Creates an empty select inventory without a title. |
|
SelectInventory(org.bukkit.plugin.Plugin plugin,
InventoryLayouter layouter)
Creates an empty select inventory with an InventoryLayouter. |
|
SelectInventory(org.bukkit.plugin.Plugin plugin,
java.lang.String title)
Creates an empty select inventory with a title. |
|
SelectInventory(org.bukkit.plugin.Plugin plugin,
java.lang.String title,
InventoryLayouter layouter)
Creates an empty select inventory with a title and an InventoryLayouter. |
|
| Method Summary | |
|---|---|
SelectInventory |
add(java.lang.Object value,
org.bukkit.inventory.ItemStack itemStack)
Adds a new item option to the inventory and sets the ItemStack directly. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.inventory.ItemStack itemStack,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Adds a new item option to the inventory and sets the ItemStack directly. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.inventory.ItemStack itemStack,
java.lang.String name,
java.lang.String... descriptions)
Adds a new item option to the inventory and sets the ItemStack directly. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material)
Adds a new item option to the inventory and sets the Material. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
int amount)
Adds a new item option to the inventory and sets the Material and the amount. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
int amount,
short data)
Adds a new item option to the inventory and sets the Material, the amount and the data/damage. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
int amount,
short data,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Adds a new item option to the inventory and sets the Material, the amount, the data/damage, the name and the descriptions as String-List. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
int amount,
short data,
java.lang.String name,
java.lang.String... descriptions)
Adds a new item option to the inventory and sets the Material, the amount, the data/damage, the name and the descriptions as String-array. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
int amount,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Adds a new item option to the inventory and sets the Material, the amount, the name and the descriptions as String-List. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
int amount,
java.lang.String name,
java.lang.String... descriptions)
Adds a new item option to the inventory and sets the Material, the amount, the name and the descriptions as String-array. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
short data)
Adds a new item option to the inventory and sets the Material and the data/damage. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
short data,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Adds a new item option to the inventory and sets the Material, the data/damage, the name and the descriptions as String-List. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
short data,
java.lang.String name,
java.lang.String... descriptions)
Adds a new item option to the inventory and sets the Material, the data/damage, the name and the descriptions as String-array. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Adds a new item option to the inventory and sets the Material, the name and the descriptions as String-List. |
SelectInventory |
add(java.lang.Object value,
org.bukkit.Material material,
java.lang.String name,
java.lang.String... descriptions)
Adds a new item option to the inventory and sets the Material, the name and the descriptions as String-array. |
org.bukkit.inventory.Inventory |
close(org.bukkit.entity.Player player)
Closes the Inventory for a defined Player. |
InventoryLayouter |
getLayouter()
Returns the InventoryLayouter. |
java.lang.String |
getTitle()
Returns the title of the Inventory. |
boolean |
isOpen(org.bukkit.entity.Player player)
Returns if the defined Player has an open Inventory of this SelectInventory. |
protected abstract void |
onClick(Selection selection,
ClickType clickType,
org.bukkit.entity.Player player)
Gets called if the holder clicks on a registered option. |
void |
onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event)
|
void |
onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event)
|
void |
onPluginDisable(org.bukkit.event.server.PluginDisableEvent event)
|
org.bukkit.inventory.InventoryView |
open(org.bukkit.entity.Player player)
Opens an Inventory for a defined Player. |
void |
setLayouter(InventoryLayouter layouter)
Sets the new InventoryLayouter. |
void |
setTitle(java.lang.String title)
Sets the title of the Inventory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SelectInventory(org.bukkit.plugin.Plugin plugin)
plugin - The plugin to bind the internal methods on.
public SelectInventory(org.bukkit.plugin.Plugin plugin,
java.lang.String title)
ChatColors.
plugin - The plugin to bind the internal methods on.title - The visible title, maybe colored with ChatColors.
public SelectInventory(org.bukkit.plugin.Plugin plugin,
InventoryLayouter layouter)
InventoryLayouter.
plugin - The plugin to bind the internal methods on.layouter - The InventoryLayouter for layouting the Inventory.
public SelectInventory(org.bukkit.plugin.Plugin plugin,
java.lang.String title,
InventoryLayouter layouter)
InventoryLayouter.
You can also colorize the title with ChatColors.
plugin - The plugin to bind the internal methods on.title - The visible title, maybe colored with ChatColors.layouter - The InventoryLayouter for layouting the Inventory.| Method Detail |
|---|
public java.lang.String getTitle()
Inventory.
Inventory.public void setTitle(java.lang.String title)
Inventory.
title - The new title of the Inventory.public InventoryLayouter getLayouter()
InventoryLayouter.
InventoryLayouter.public void setLayouter(InventoryLayouter layouter)
InventoryLayouter.
layouter - The new InventoryLayouter.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material)
Material.
value - The information for the option as Object.material - The Material for the item.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
int amount)
Material and the amount.
value - The information for the option as Object.material - The Material for the item.amount - The amount of items.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
short data)
Material and the data/damage.
value - The information for the option as Object.material - The Material for the item.data - The data for non-damageable items and damage for damageable ones.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
int amount,
short data)
Material, the amount and the data/damage.
value - The information for the option as Object.material - The Material for the item.amount - The amount of items.data - The data for non-damageable items and damage for damageable ones.
public SelectInventory add(java.lang.Object value,
org.bukkit.inventory.ItemStack itemStack)
ItemStack directly.
value - The information for the option as Object.itemStack - The ItemStack.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
java.lang.String name,
java.lang.String... descriptions)
Material, the name and the descriptions as String-array.
value - The information for the option as Object.material - The Material for the item.name - The name of the item as String.descriptions - The descriptions for the item as String-array.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
int amount,
java.lang.String name,
java.lang.String... descriptions)
Material, the amount, the name and the descriptions as String-array.
value - The information for the option as Object.material - The Material for the item.amount - The amount of items.name - The name of the item as String.descriptions - The descriptions for the item as String-array.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
short data,
java.lang.String name,
java.lang.String... descriptions)
Material, the data/damage, the name and the descriptions as String-array.
value - The information for the option as Object.material - The Material for the item.data - The data for non-damageable items and damage for damageable ones.name - The name of the item as String.descriptions - The descriptions for the item as String-array.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
int amount,
short data,
java.lang.String name,
java.lang.String... descriptions)
Material, the amount, the data/damage, the name and the descriptions as String-array.
value - The information for the option as Object.material - The Material for the item.amount - The amount of items.data - The data for non-damageable items and damage for damageable ones.name - The name of the item as String.descriptions - The descriptions for the item as String-array.
public SelectInventory add(java.lang.Object value,
org.bukkit.inventory.ItemStack itemStack,
java.lang.String name,
java.lang.String... descriptions)
ItemStack directly. Furthemore, it sets the name and the descriptions as String-array.
value - The information for the option as Object.itemStack - The ItemStack.name - The name of the item as String.descriptions - The descriptions for the item as String-array.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Material, the name and the descriptions as String-List.
value - The information for the option as Object.material - The Material for the item.name - The name of the item as String.descriptions - The descriptions for the item as String-List.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
int amount,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Material, the amount, the name and the descriptions as String-List.
value - The information for the option as Object.material - The Material for the item.amount - The amount of items.name - The name of the item as String.descriptions - The descriptions for the item as String-List.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
short data,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Material, the data/damage, the name and the descriptions as String-List.
value - The information for the option as Object.material - The Material for the item.data - The data for non-damageable items and damage for damageable ones.name - The name of the item as String.descriptions - The descriptions for the item as String-List.
public SelectInventory add(java.lang.Object value,
org.bukkit.Material material,
int amount,
short data,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
Material, the amount, the data/damage, the name and the descriptions as String-List.
value - The information for the option as Object.material - The Material for the item.amount - The amount of items.data - The data for non-damageable items and damage for damageable ones.name - The name of the item as String.descriptions - The descriptions for the item as String-List.
public SelectInventory add(java.lang.Object value,
org.bukkit.inventory.ItemStack itemStack,
java.lang.String name,
java.util.List<java.lang.String> descriptions)
ItemStack directly. Furthemore, it sets the name and the descriptions as String-List.
value - The information for the option as Object.itemStack - The ItemStack.name - The name of the item as String.descriptions - The descriptions for the item as String-List.
public boolean isOpen(org.bukkit.entity.Player player)
Player has an open Inventory of this SelectInventory.
player - The Player to check.
Player has an open Inventory of this SelectInventory.public org.bukkit.inventory.InventoryView open(org.bukkit.entity.Player player)
Inventory for a defined Player.
player - The Player which gets the Inventory.
Inventory.public org.bukkit.inventory.Inventory close(org.bukkit.entity.Player player)
Inventory for a defined Player.
Inventory.public void onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event)
protected abstract void onClick(Selection selection,
ClickType clickType,
org.bukkit.entity.Player player)
selection - The selected Selection (with the informational value and the graphical ItemStack).clickType - The ClickType of the click.player - The Player who selected.public void onInventoryClose(org.bukkit.event.inventory.InventoryCloseEvent event)
public void onPluginDisable(org.bukkit.event.server.PluginDisableEvent event)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||