Interface Interaction

All Superinterfaces:
net.kyori.adventure.audience.Audience, CommandSender, DataComponentView, Entity, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, net.kyori.adventure.pointer.Pointered, ServerOperator, net.kyori.adventure.sound.Sound.Emitter, net.kyori.adventure.sound.Sound.Source.Provider

public interface Interaction extends Entity
Represents an entity designed to only record interactions.
Since:
1.19.4
  • Method Details

    • getInteractionWidth

      float getInteractionWidth()
      Gets the width of this interaction entity.
      Returns:
      width
      Since:
      1.19.4
    • setInteractionWidth

      void setInteractionWidth(float width)
      Sets the width of this interaction entity.
      Parameters:
      width - new width
      Since:
      1.19.4
    • getInteractionHeight

      float getInteractionHeight()
      Gets the height of this interaction entity.
      Returns:
      height
      Since:
      1.19.4
    • setInteractionHeight

      void setInteractionHeight(float height)
      Sets the height of this interaction entity.
      Parameters:
      height - new height
      Since:
      1.19.4
    • isResponsive

      boolean isResponsive()
      Gets if this interaction entity should trigger a response when interacted with.
      Returns:
      response setting
      Since:
      1.19.4
    • setResponsive

      void setResponsive(boolean response)
      Sets if this interaction entity should trigger a response when interacted with.
      Parameters:
      response - new setting
      Since:
      1.19.4
    • getLastAttack

      @Nullable @Nullable Interaction.PreviousInteraction getLastAttack()
      Gets the last attack on this interaction entity.
      Returns:
      last attack data, if present
      Since:
      1.19.4
    • getLastInteraction

      @Nullable @Nullable Interaction.PreviousInteraction getLastInteraction()
      Gets the last interaction on this entity.
      Returns:
      last interaction data, if present
      Since:
      1.19.4