public interface MenuComponent
Modifier and Type | Method and Description |
---|---|
boolean |
onInteract(org.bukkit.entity.Player player,
double x,
double y,
MapInteraction interaction)
Called when a player interacts with a menu, either from pressing Q, or CTRL+Q.
|
boolean |
onView(MenuCanvas canvas,
org.bukkit.entity.Player player,
double x,
double y)
Called when a player is viewing a menu.
|
boolean onView(MenuCanvas canvas, org.bukkit.entity.Player player, double x, double y)
canvas
- The canvas that's being viewed.player
- The player viewing the menu.x
- The X coordinate of the cursor relative to the top left of this icon, from 0 to 255.y
- The Y coordinate of the cursor relative to the top left of this icon, from 0 to 255.boolean onInteract(org.bukkit.entity.Player player, double x, double y, MapInteraction interaction)
player
- The player viewing the menu.x
- The X coordinate of the cursor relative to the top left of this icon, from 0 to 255.y
- The Y coordinate of the cursor relative to the top left of this icon, from 0 to 255.interaction
- Whether or not the interaction was by pressing Q.