public class OutlinePane extends Pane implements Flippable, Orientable, Rotatable
Pane.PriorityOrientable.Orientation| Constructor and Description |
|---|
OutlinePane(int length,
int height) |
OutlinePane(int x,
int y,
int length,
int height) |
OutlinePane(int x,
int y,
int length,
int height,
Pane.Priority priority) |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(GuiItem item)
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
|
boolean |
doesRepeat()
Gets whether this outline pane repeats itself
|
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
|
int |
getGap()
Gets the gap of the pane
|
List<GuiItem> |
getItems()
Gets all the items in this pane and all underlying panes
|
Orientable.Orientation |
getOrientation()
Gets the orientation of this outline pane
|
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.
|
void |
insertItem(GuiItem item,
int index)
Adds a gui item in the specified index
|
boolean |
isFlippedHorizontally()
Gets whether this pane's items are flipped horizontally
|
boolean |
isFlippedVertically()
Gets whether this pane's items are flipped vertically
|
static OutlinePane |
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 |
setGap(int gap)
Sets the gap of the pane
|
void |
setOrientation(Orientable.Orientation orientation)
Sets the orientation of this outline pane
|
void |
setRepeat(boolean repeat)
Sets whether this pane should repeat itself
|
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, setYclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadpublic OutlinePane(int x,
int y,
int length,
int height,
@NotNull
Pane.Priority priority)
public OutlinePane(int x,
int y,
int length,
int height)
public OutlinePane(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 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.public void insertItem(@NotNull
GuiItem item,
int index)
item - the item to addindex - the item's indexpublic void addItem(@NotNull
GuiItem item)
item - the item to setpublic void removeItem(@NotNull
GuiItem item)
item - the item to removepublic void clear()
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 verticallypublic void setGap(int gap)
gap - the new gappublic void setOrientation(@NotNull
Orientable.Orientation orientation)
setOrientation in interface Orientableorientation - the new orientationpublic void setRepeat(boolean repeat)
repeat - whether the pane should repeat@NotNull @Contract(pure=true) public Collection<Pane> getPanes()
@Contract(pure=true) public boolean doesRepeat()
@Contract(pure=true) public int getGap()
@NotNull public List<GuiItem> getItems()
@NotNull @Contract(pure=true) public Orientable.Orientation getOrientation()
getOrientation in interface Orientable@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 OutlinePane load(@NotNull Object instance, @NotNull Element element)
instance - the instance classelement - the elementCopyright © 2019. All rights reserved.