Skip to content

Entity Events

Package: com.hypixel.hytale.server.core.event.events.entity

Events related to entity lifecycle and state changes.


Abstract base class for entity events with generic type parameters.

Class: com.hypixel.hytale.server.core.event.events.entity.EntityEvent<EntityType extends Entity, KeyType>

PropertyValue
ImplementsIEvent<KeyType>
AbstractYes
  • EntityType extends Entity - The type of entity this event relates to
  • KeyType - The event key type for filtering
MethodReturn TypeDescription
getEntity()EntityTypeReturns the entity associated with this event

Fired when an entity is being removed from the world.

Class: com.hypixel.hytale.server.core.event.events.entity.EntityRemoveEvent

PropertyValue
ExtendsEntityEvent<Entity, String>
KeyTypeString
AsyncNo
CancellableNo
MethodReturn TypeDescription
getEntity()EntityReturns the entity being removed (inherited)

Fired when an entity is about to be removed from the world (death, despawn, etc.).


Fired when a living entity uses/interacts with a block.

Class: com.hypixel.hytale.server.core.event.events.entity.LivingEntityUseBlockEvent

PropertyValue
ImplementsIEvent<String>
DeprecatedYes (for removal)
AsyncNo
CancellableNo
KeyTypeString (block type identifier)

Warning: This event is deprecated and marked for removal in a future version.

MethodReturn TypeDescription
getBlockType()StringReturns the block type identifier
getRef()Ref<EntityStore>Returns the entity reference

Fired when a living entity (player, NPC, mob) interacts with a block. Keyed by block type identifier, so you can listen for specific block types.


Fired after any inventory section changes — items added, removed, or moved. This event is not cancellable (notification only). For cancellable item actions, see DropItemEvent and SwitchActiveSlotEvent. See Player Inventory for the inventory API.

Class: com.hypixel.hytale.server.core.event.events.entity.LivingEntityInventoryChangeEvent

PropertyValue
ExtendsEntityEvent<LivingEntity, String>
KeyTypeString (world name)
AsyncNo
CancellableNo
MethodReturn TypeDescription
getEntity()LivingEntityThe entity whose inventory changed (inherited)
getItemContainer()ItemContainerThe section that changed
getTransaction()TransactionWhat changed (slot, before/after state)

Fired when any ItemContainer’s contents change — works for both player inventory sections and window containers. This is a per-container event (keyed by Void, dispatched on the container’s own event bus), unlike LivingEntityInventoryChangeEvent which fires on the global bus.

Class: com.hypixel.hytale.server.core.inventory.container.ItemContainer.ItemContainerChangeEvent

PropertyValue
Typerecord
ImplementsIEvent<Void>
AsyncNo
CancellableNo
KeyTypeVoid
ComponentTypeDescription
containerItemContainerThe container that changed
transactionTransactionWhat changed (slot, before/after state)