Interface BaseBukkitEntity

All Superinterfaces:
kr.toxicity.model.api.entity.BaseEntity, kr.toxicity.model.api.nms.Identifiable, org.bukkit.persistence.PersistentDataHolder, io.papermc.paper.persistence.PersistentDataViewHolder
All Known Subinterfaces:
BaseBukkitPlayer

public interface BaseBukkitEntity extends kr.toxicity.model.api.entity.BaseEntity, org.bukkit.persistence.PersistentDataHolder
Represents a Bukkit-specific entity adapter.

This interface extends BaseEntity and PersistentDataHolder to provide access to the underlying Bukkit entity and its persistent data container.

Since:
2.0.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final @NotNull org.bukkit.NamespacedKey
    The namespaced key used for storing tracker data in the entity's persistent data container.
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NotNull org.bukkit.entity.Entity
    Returns the underlying Bukkit entity.
    default @NotNull kr.toxicity.model.api.util.TransformedItemStack
    Returns the item in the entity's main hand.
    default @Nullable String
    Retrieves the model data stored in the entity's persistent data container.
    default void
    modelData(@Nullable String modelData)
    Stores the model data in the entity's persistent data container.
    default @NotNull kr.toxicity.model.api.util.TransformedItemStack
    Returns the item in the entity's offhand.

    Methods inherited from interface kr.toxicity.model.api.entity.BaseEntity

    bodyYaw, customName, damageTick, dead, fly, glow, ground, handle, hasControllingPassenger, hasModelData, headYaw, id, invisible, location, onWalk, passengerPosition, pitch, platform, registry, scale, trackedBy, walkSpeed, yaw

    Methods inherited from interface kr.toxicity.model.api.nms.Identifiable

    uuid

    Methods inherited from interface org.bukkit.persistence.PersistentDataHolder

    getPersistentDataContainer
  • Field Details

    • TRACKING_ID

      @NotNull static final @NotNull org.bukkit.NamespacedKey TRACKING_ID
      The namespaced key used for storing tracker data in the entity's persistent data container.
      Since:
      2.0.0
  • Method Details

    • entity

      @NotNull default @NotNull org.bukkit.entity.Entity entity()
      Returns the underlying Bukkit entity.
      Returns:
      the Bukkit entity
      Since:
      2.0.0
    • mainHand

      @NotNull default @NotNull kr.toxicity.model.api.util.TransformedItemStack mainHand()
      Returns the item in the entity's main hand.
      Specified by:
      mainHand in interface kr.toxicity.model.api.entity.BaseEntity
      Returns:
      the main hand item
      Since:
      2.0.0
    • offHand

      @NotNull default @NotNull kr.toxicity.model.api.util.TransformedItemStack offHand()
      Returns the item in the entity's offhand.
      Specified by:
      offHand in interface kr.toxicity.model.api.entity.BaseEntity
      Returns:
      the offhand item
      Since:
      2.0.0
    • modelData

      @Nullable default @Nullable String modelData()
      Retrieves the model data stored in the entity's persistent data container.
      Specified by:
      modelData in interface kr.toxicity.model.api.entity.BaseEntity
      Returns:
      the model data string, or null if not present
      Since:
      2.0.0
    • modelData

      default void modelData(@Nullable @Nullable String modelData)
      Stores the model data in the entity's persistent data container.
      Specified by:
      modelData in interface kr.toxicity.model.api.entity.BaseEntity
      Parameters:
      modelData - the model data string, or null to remove it
      Since:
      2.0.0