Interface InteractableValue
- All Known Implementing Classes:
TextCodingValue
public interface InteractableValue
InteractableValue
This interface is used for coding values, that do certain actions when player clicks left or right clicks while holding them in main hand.-
Method Summary
Modifier and TypeMethodDescriptionbooleanonPlayerInteract(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.ItemStack item, @NotNull org.bukkit.event.player.PlayerInteractEvent event) Used for doing actions, when player clicks with item in hand.
-
Method Details
-
onPlayerInteract
boolean onPlayerInteract(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull org.bukkit.event.player.PlayerInteractEvent event) Used for doing actions, when player clicks with item in hand.Returns whether action was done successfully.
- Parameters:
player- player, that interacted with coding value.item- item of value.event- event of interaction.- Returns:
- true - if action was done, false - interaction was ignored.
-