Package noppes.npcs.api.gui
Interface ILine
-
- All Superinterfaces:
ICustomGuiComponent
public interface ILine extends ICustomGuiComponent
Represents a line component in a custom GUI. Provides methods to get or set endpoints and thickness.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getThickness()
Returns the thickness of the line.int
getX1()
Returns the starting x coordinate of the line.int
getX2()
Returns the ending x coordinate of the line.int
getY1()
Returns the starting y coordinate of the line.int
getY2()
Returns the ending y coordinate of the line.void
setThickness(int thickness)
Sets the thickness of the line.void
setX1(int x1)
Sets the starting x coordinate of the line.void
setX2(int x2)
Sets the ending x coordinate of the line.void
setY1(int y1)
Sets the starting y coordinate of the line.void
setY2(int y2)
Sets the ending y coordinate of the line.-
Methods inherited from interface noppes.npcs.api.gui.ICustomGuiComponent
fromNBT, getAlpha, getColor, getHoverText, getID, getPosX, getPosY, getRotation, hasHoverText, setAlpha, setColor, setHoverText, setHoverText, setID, setPos, setRotation, toNBT
-
-
-
-
Method Detail
-
getX1
int getX1()
Returns the starting x coordinate of the line.- Returns:
- the x1 value.
-
getY1
int getY1()
Returns the starting y coordinate of the line.- Returns:
- the y1 value.
-
getX2
int getX2()
Returns the ending x coordinate of the line.- Returns:
- the x2 value.
-
getY2
int getY2()
Returns the ending y coordinate of the line.- Returns:
- the y2 value.
-
getThickness
int getThickness()
Returns the thickness of the line.- Returns:
- the thickness in pixels.
-
setX1
void setX1(int x1)
Sets the starting x coordinate of the line.- Parameters:
x1
- the new x1 value.
-
setY1
void setY1(int y1)
Sets the starting y coordinate of the line.- Parameters:
y1
- the new y1 value.
-
setX2
void setX2(int x2)
Sets the ending x coordinate of the line.- Parameters:
x2
- the new x2 value.
-
setY2
void setY2(int y2)
Sets the ending y coordinate of the line.- Parameters:
y2
- the new y2 value.
-
setThickness
void setThickness(int thickness)
Sets the thickness of the line.- Parameters:
thickness
- the new thickness.
-
-