Package dev.aurelium.slate.item
Class ItemClick
java.lang.Object
dev.aurelium.slate.item.ItemClick
- Direct Known Subclasses:
TemplateClick
Stores contextual data for when a player clicks an item.
-
Constructor Summary
ConstructorsConstructorDescriptionItemClick(Slate slate, org.bukkit.entity.Player player, org.bukkit.event.inventory.InventoryClickEvent event, org.bukkit.inventory.ItemStack item, SlotPos pos, ActiveMenu menu) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.event.inventory.InventoryClickEventevent()Gets the original Bukkit event for the inventory click.org.bukkit.inventory.ItemStackitem()Gets the ItemStack that was clicked.locale()Gets the locale of the player as defined by theGlobalBehavior.localeProvider().menu()Gets the active menu the player is viewing.org.bukkit.entity.Playerplayer()Gets the player that clicked the item.pos()Gets the slot position that was clicked.
-
Constructor Details
-
Method Details
-
player
public org.bukkit.entity.Player player()Gets the player that clicked the item.- Returns:
- the player
-
locale
Gets the locale of the player as defined by theGlobalBehavior.localeProvider(). If the locale provider is not set, this will always returnLocale.ENGLISH. This is useful if you have player-dependent locales.- Returns:
- the locale of the player
-
event
public org.bukkit.event.inventory.InventoryClickEvent event()Gets the original Bukkit event for the inventory click.- Returns:
- the InventoryClickEvent
-
item
public org.bukkit.inventory.ItemStack item()Gets the ItemStack that was clicked.- Returns:
- the clicked ItemStack
-
pos
Gets the slot position that was clicked.- Returns:
- the clicked slot
-