Constructor and Description |
---|
RadioIconSwitch(int[] switchOn,
int[] switchOff,
int width,
java.lang.String commandOn,
java.lang.String commandOff) |
Modifier and Type | Method and Description |
---|---|
int[] |
getDisplay()
Get the main representation of this icon
|
int |
getHeight()
Get the overall height of this icon
|
int |
getWidth()
Get the overall width of this icon
|
void |
init(RadioCanvas provider)
Called when a RadioCanvas is ready to receive input from this icon
|
boolean |
isOn() |
void |
onClick(org.bukkit.entity.Entity entity,
DisplayInteract action,
int x,
int y)
Called interaction from either a player or a projectile
|
void |
terminate()
Called when the RadioCanvas is disabling itself; Most likely end of use
|
public RadioIconSwitch(int[] switchOn, int[] switchOff, int width, java.lang.String commandOn, java.lang.String commandOff)
public int getWidth()
RadioIcon
public int getHeight()
RadioIcon
public boolean isOn()
public int[] getDisplay()
RadioIcon
getDisplay
in interface RadioIcon
public void init(RadioCanvas provider)
RadioIcon
public void onClick(org.bukkit.entity.Entity entity, DisplayInteract action, int x, int y)
RadioIcon
onClick
in interface RadioIcon
entity
- The entity, either a player or a projectileaction
- Will always be a player unless action is DisplayInteract.PROJECTILE
x
- The X coordinate of the click relative to the top left of this icony
- The Y coordinate of the click relative to the top left of this icon