public class Slider extends VariableBar
Pane.PriorityOrientable.OrientationbackgroundPane, fillPane, flipHorizontally, flipVertically, orientation, value| Constructor and Description |
|---|
Slider(int length,
int height) |
Slider(int x,
int y,
int length,
int height) |
Slider(int x,
int y,
int length,
int height,
Pane.Priority priority) |
| Modifier and Type | Method and Description |
|---|---|
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
|
float |
getValue()
Gets the value as a float in between (0,1) this bar is currently set at.
|
static Slider |
load(Object instance,
Element element)
Loads a percentage bar from a given element
|
void |
setValue(float value)
Sets the value of this bar.
|
clear, display, flipHorizontally, flipVertically, getItems, getOrientation, getPanes, isFlippedHorizontally, isFlippedVertically, setBackgroundItem, setFillItem, setHeight, setLength, setOrientation, setX, setYgetHeight, getLength, getPriority, getPropertyMappings, getX, getY, isVisible, load, loadItem, setOnClick, setOnLocalClick, setPriority, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadpublic Slider(int x,
int y,
int length,
int height,
@NotNull
Pane.Priority priority)
public Slider(int x,
int y,
int length,
int height)
public Slider(int length,
int height)
public 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 setValue(float value)
IllegalArgumentException.value - the new value.IllegalArgumentException - when the value is out of rangepublic float getValue()
Copyright © 2019. All rights reserved.