public abstract class RectangularComponent extends Component
| Modifier and Type | Field and Description |
|---|---|
protected int |
height
The X position.
|
protected int |
width
The X position.
|
protected int |
x
The X position.
|
protected int |
y
The X position.
|
clickAction, hidden, id, interaction| Constructor and Description |
|---|
RectangularComponent(String id,
Action clickAction,
boolean hidden,
Interaction interaction,
int x,
int y,
int width,
int height)
Instantiates a new RectangularComponent.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight()
Gets the height.
|
int |
getWidth()
Gets the width.
|
int |
getX()
Gets the x position.
|
int |
getY()
Gets the y position.
|
boolean |
isInBounds(org.bukkit.entity.Player player,
GuiPoint cursor)
Checks whether the cursor is in bounds of the component.
|
apply, clone, dispose, getClickAction, getId, getInteraction, getState, isHidden, locate, locate, locateOn, onClick, setClickAction, setHiddenprotected int x
protected int y
protected int width
protected int height
public RectangularComponent(String id, Action clickAction, boolean hidden, Interaction interaction, int x, int y, int width, int height)
id - the component idclickAction - the click actionshidden - the hiddeninteraction - the interactionx - the xy - the ywidth - the widthheight - the heightpublic boolean isInBounds(org.bukkit.entity.Player player,
GuiPoint cursor)
ComponentisInBounds in class Componentplayer - the playercursor - the cursorpublic int getX()
public int getY()
public int getWidth()
public int getHeight()
Copyright © 2021. All rights reserved.