Class InteractionMock

java.lang.Object
org.bukkit.command.CommandSender.Spigot
org.bukkit.entity.Entity.Spigot
be.seeseemelk.mockbukkit.entity.EntityMock
be.seeseemelk.mockbukkit.entity.InteractionMock
All Implemented Interfaces:
MessageTarget, io.papermc.paper.persistence.PersistentDataViewHolder, net.kyori.adventure.audience.Audience, net.kyori.adventure.pointer.Pointered, net.kyori.adventure.sound.Sound.Emitter, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.command.CommandSender, org.bukkit.entity.Entity, org.bukkit.entity.Interaction, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder

public class InteractionMock extends EntityMock implements org.bukkit.entity.Interaction
Mock implementation of a Interaction.
See Also:
  • Constructor Details

    • InteractionMock

      public InteractionMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid)
      Constructs a new InteractionMock on the provided ServerMock with a specified UUID.
      Parameters:
      server - The server to create the entity on.
      uuid - The UUID of the entity.
  • Method Details

    • getInteractionWidth

      public float getInteractionWidth()
      Specified by:
      getInteractionWidth in interface org.bukkit.entity.Interaction
    • setInteractionWidth

      public void setInteractionWidth(float width)
      Specified by:
      setInteractionWidth in interface org.bukkit.entity.Interaction
    • getInteractionHeight

      public float getInteractionHeight()
      Specified by:
      getInteractionHeight in interface org.bukkit.entity.Interaction
    • setInteractionHeight

      public void setInteractionHeight(float height)
      Specified by:
      setInteractionHeight in interface org.bukkit.entity.Interaction
    • isResponsive

      public boolean isResponsive()
      Specified by:
      isResponsive in interface org.bukkit.entity.Interaction
    • setResponsive

      public void setResponsive(boolean response)
      Specified by:
      setResponsive in interface org.bukkit.entity.Interaction
    • getLastAttack

      @Nullable public @Nullable org.bukkit.entity.Interaction.PreviousInteraction getLastAttack()
      Specified by:
      getLastAttack in interface org.bukkit.entity.Interaction
    • setLastAttack

      public void setLastAttack(@Nullable @Nullable org.bukkit.entity.Interaction.PreviousInteraction lastAttack)
      Set the last attack on this interaction entity.
      Parameters:
      lastAttack - Last attack data, if present
    • getLastInteraction

      @Nullable public @Nullable org.bukkit.entity.Interaction.PreviousInteraction getLastInteraction()
      Specified by:
      getLastInteraction in interface org.bukkit.entity.Interaction
    • setLastInteraction

      public void setLastInteraction(@Nullable @Nullable org.bukkit.entity.Interaction.PreviousInteraction lastInteraction)
      Sets the last interaction on this entity.
      Parameters:
      lastInteraction - Interaction data, if present
    • getType

      @NotNull public @NotNull org.bukkit.entity.EntityType getType()
      Specified by:
      getType in interface org.bukkit.entity.Entity
      Overrides:
      getType in class EntityMock