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
FieldsModifier and TypeFieldDescriptionstatic final @NotNull org.bukkit.NamespacedKeyThe namespaced key used for storing tracker data in the entity's persistent data container. -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull org.bukkit.entity.Entityentity()Returns the underlying Bukkit entity.default @NotNull kr.toxicity.model.api.util.TransformedItemStackmainHand()Returns the item in the entity's main hand.default @Nullable StringRetrieves the model data stored in the entity's persistent data container.default voidStores the model data in the entity's persistent data container.default @NotNull kr.toxicity.model.api.util.TransformedItemStackoffHand()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, yawMethods inherited from interface kr.toxicity.model.api.nms.Identifiable
uuidMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Field Details
-
TRACKING_ID
@NotNull static final @NotNull org.bukkit.NamespacedKey TRACKING_IDThe 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:
mainHandin interfacekr.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:
offHandin interfacekr.toxicity.model.api.entity.BaseEntity- Returns:
- the offhand item
- Since:
- 2.0.0
-
modelData
Retrieves the model data stored in the entity's persistent data container.- Specified by:
modelDatain interfacekr.toxicity.model.api.entity.BaseEntity- Returns:
- the model data string, or null if not present
- Since:
- 2.0.0
-
modelData
Stores the model data in the entity's persistent data container.- Specified by:
modelDatain interfacekr.toxicity.model.api.entity.BaseEntity- Parameters:
modelData- the model data string, or null to remove it- Since:
- 2.0.0
-