Skip to content

RemoveReason

Package: com.hypixel.hytale.component

public enum RemoveReason

Indicates why an entity is being removed from a Store. Passed to RefSystem.onEntityRemove() and HolderSystem.onEntityRemoved() so systems can distinguish between permanent deletion and temporary unloading.

ConstantDescription
REMOVEThe entity is being permanently removed (e.g., death, despawn, explicit deletion). The entity’s references are invalidated and it will not return.
UNLOADThe entity is being temporarily unloaded (e.g., chunk unload). It may be restored later via LOAD. Systems should preserve state rather than clean up.
  • AddReason — the corresponding enum for entity addition
  • StoreremoveEntity() accepts a RemoveReason
  • CommandBufferremoveEntity() and tryRemoveEntity() accept a RemoveReason
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.