Skip to content

Prefab Events

Package: com.hypixel.hytale.server.core.prefab.event

Events related to prefab (structure template) operations.


Fired when a prefab is being pasted into the world. Cancellable.

Class: com.hypixel.hytale.server.core.prefab.event.PrefabPasteEvent

PropertyValue
ExtendsCancellableEcsEvent
AsyncNo
CancellableYes
FieldTypeDescription
prefabIdintThe ID of the prefab being pasted
pasteStartbooleanWhether this is the start of the paste operation
MethodReturnsDescription
getPrefabId()intReturns the prefab ID
isPasteStart()booleanReturns true if this is the start of the paste operation

Fired when a prefab structure is pasted into the world (world generation, commands, etc.).


Fired when an entity is placed as part of a prefab.

Class: com.hypixel.hytale.server.core.prefab.event.PrefabPlaceEntityEvent

PropertyValue
ExtendsEcsEvent
AsyncNo
CancellableNo
FieldTypeDescription
prefabIdintThe ID of the prefab being placed
holderHolder<EntityStore>The holder containing entity data to be placed
MethodReturnsDescription
getPrefabId()intReturns the prefab ID
getHolder()Holder<EntityStore>Returns the entity store holder (annotated @Nonnull)

Fired for each entity that is spawned as part of pasting a prefab.