Skip to content

Adventure Events

Packages:

  • com.hypixel.hytale.builtin.adventure.objectives.events
  • com.hypixel.hytale.builtin.instances.event

Events related to adventure gameplay, objectives, and instances.


Fired when a player opens a treasure chest.

Class: com.hypixel.hytale.builtin.adventure.objectives.events.TreasureChestOpeningEvent

PropertyValue
ImplementsIEvent<String>
AsyncNo
CancellableNo
FieldTypeNullableDescription
objectiveUUIDUUIDNoUUID of the objective
chestUUIDUUIDNoUUID of the treasure chest
playerRefRef<EntityStore>NoReference to the player entity
storeStore<EntityStore>NoEntity store
MethodReturn TypeDescription
getObjectiveUUID()UUIDReturns the objective UUID
getChestUUID()UUIDReturns the chest UUID
getPlayerRef()Ref<EntityStore>Returns the player entity reference
getStore()Store<EntityStore>Returns the entity store

Fired when a player interacts with and opens a treasure chest.


Fired when an instance is discovered. Abstract base with concrete subclasses.

Class: com.hypixel.hytale.builtin.instances.event.DiscoverInstanceEvent

PropertyValue
ExtendsEcsEvent
AsyncNo
CancellableNo
AbstractYes
FieldTypeNullableDescription
instanceWorldUuidUUIDNoUUID of the instance world
discoveryConfigInstanceDiscoveryConfigNoConfiguration for the instance discovery
MethodReturn TypeDescription
getInstanceWorldUuid()UUIDReturns the instance world UUID
getDiscoveryConfig()InstanceDiscoveryConfigReturns the discovery configuration

Fired when an instance discovery should be displayed to the player.

This event is cancellable.

PropertyValue
ExtendsDiscoverInstanceEvent
ImplementsICancellableEcsEvent
CancellableYes
FieldTypeNullableDescription
cancelledbooleanNoWhether the event is cancelled
displaybooleanNoWhether the discovery should be displayed
MethodReturn TypeDescription
shouldDisplay()booleanReturns whether the discovery should be displayed
setDisplay(boolean)voidSets whether to display the discovery

Fired when a player discovers an instance (dungeon, special area, etc.).