Pane.Priority| Constructor and Description |
|---|
StaticPane(int length,
int height) |
StaticPane(int x,
int y,
int length,
int height) |
StaticPane(int x,
int y,
int length,
int height,
Pane.Priority priority) |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(GuiItem item,
int x,
int y)
Adds a gui item at the specific spot in the pane
|
void |
clear()
Clears the entire pane of any items/panes.
|
boolean |
click(Gui gui,
org.bukkit.event.inventory.InventoryClickEvent event,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
Called whenever there is being clicked on this pane
|
void |
display(Gui gui,
org.bukkit.inventory.Inventory inventory,
org.bukkit.inventory.PlayerInventory playerInventory,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
Has to set all the items in the right spot inside the inventory
|
void |
fillWith(org.bukkit.inventory.ItemStack itemStack)
Fills all empty space in the pane with the given
itemStack |
void |
flipHorizontally(boolean flipHorizontally)
Sets whether this pane should flip its items horizontally
|
void |
flipVertically(boolean flipVertically)
Sets whether this pane should flip its items vertically
|
Collection<GuiItem> |
getItems()
Gets all the items in this pane and all underlying panes
|
Collection<Pane> |
getPanes()
Gets all the panes in this panes, including any child panes from other panes
|
int |
getRotation()
Gets the rotation specified to this pane.
|
boolean |
isFlippedHorizontally()
Gets whether this pane's items are flipped horizontally
|
boolean |
isFlippedVertically()
Gets whether this pane's items are flipped vertically
|
static StaticPane |
load(Object instance,
Element element)
Loads an outline pane from a given element
|
void |
removeItem(GuiItem item)
Removes the specified item from the pane
|
void |
setRotation(int rotation)
Sets the rotation of this pane.
|
getHeight, getLength, getPriority, getPropertyMappings, getX, getY, isVisible, load, loadItem, setHeight, setLength, setOnClick, setOnLocalClick, setPriority, setVisible, setX, setYpublic StaticPane(int x,
int y,
int length,
int height,
@NotNull
Pane.Priority priority)
public StaticPane(int x,
int y,
int length,
int height)
public StaticPane(int length,
int height)
public void display(@NotNull
Gui gui,
@NotNull
org.bukkit.inventory.Inventory inventory,
@NotNull
org.bukkit.inventory.PlayerInventory playerInventory,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
display in class Panegui - the gui for which we're renderinginventory - the inventory that the items should be displayed inplayerInventory - the player's inventorypaneOffsetX - the pane's offset on the x axispaneOffsetY - the pane's offset on the y axismaxLength - the maximum length of the panemaxHeight - the maximum height of the panepublic void addItem(@NotNull
GuiItem item,
int x,
int y)
item - the item to setx - the x coordinate of the position of the itemy - the y coordinate of the position of the itempublic void removeItem(@NotNull
GuiItem item)
item - the item to removepublic boolean click(@NotNull
Gui gui,
@NotNull
org.bukkit.event.inventory.InventoryClickEvent event,
int paneOffsetX,
int paneOffsetY,
int maxLength,
int maxHeight)
click in class Panegui - the gui this event stems fromevent - the event that occurred while clicking on this itempaneOffsetX - the pane's offset on the x axispaneOffsetY - the pane's offset on the y axismaxLength - the maximum length of the panemaxHeight - the maximum height of the panepublic void setRotation(int rotation)
setRotation in interface Rotatablerotation - the rotation of this pane, must be divisible by 90.@Contract(value="null -> fail")
public void fillWith(@NotNull
org.bukkit.inventory.ItemStack itemStack)
itemStackitemStack - The ItemStack to fill the empty space with@NotNull public Collection<GuiItem> getItems()
public void clear()
@NotNull @Contract(pure=true) public Collection<Pane> getPanes()
public void flipHorizontally(boolean flipHorizontally)
flipHorizontally in interface FlippableflipHorizontally - whether the pane should flip items horizontallypublic void flipVertically(boolean flipVertically)
flipVertically in interface FlippableflipVertically - whether the pane should flip items vertically@Contract(pure=true) public int getRotation()
getRotation in interface Rotatable@Contract(pure=true) public boolean isFlippedHorizontally()
isFlippedHorizontally in interface Flippable@Contract(pure=true) public boolean isFlippedVertically()
isFlippedVertically in interface Flippable@NotNull @Contract(value="_, null -> fail") public static StaticPane load(@NotNull Object instance, @NotNull Element element)
instance - the instance classelement - the elementCopyright © 2019. All rights reserved.