Skip to content

Module Events

Events from various server modules.


Package: com.hypixel.hytale.server.core.modules.entity.damage.event

Dispatched during death processing after an entity is killed.

ECS events for kill feed display. All subclasses are cancellable.

Class: com.hypixel.hytale.server.core.modules.entity.damage.event.KillFeedEvent

These events are dispatched TO entities (killer and deceased) to build the kill feed message.

Invoked on the killer entity to get their display name. This event is cancellable.

FieldTypeDescription
damageDamageThe damage that caused death
targetRefRef<EntityStore>Reference to deceased entity
messageMessageMutable - set the killer’s name

Methods:

SignatureDescription
Damage getDamage()Returns the damage instance that caused the death
Ref<EntityStore> getTargetRef()Returns a reference to the deceased entity
Message getMessage()Returns the current killer display message, or null if not set
void setMessage(Message message)Sets the killer’s display name message

Invoked on the deceased entity to get their display name. This event is cancellable.

FieldTypeDescription
damageDamageThe damage that caused death
messageMessageMutable - set the deceased’s name

Methods:

SignatureDescription
Damage getDamage()Returns the damage instance that caused the death
Message getMessage()Returns the current deceased display message, or null if not set
void setMessage(Message message)Sets the deceased’s display name message

Controls broadcast of the kill feed. This event is cancellable.

FieldTypeDescription
damageDamageThe damage that caused death
iconStringMutable - death icon
broadcastTargetsList<PlayerRef>Who receives the message

Methods:

SignatureDescription
Damage getDamage()Returns the damage instance that caused the death
String getIcon()Returns the current death icon, or null if not set
void setIcon(String icon)Sets the death icon for the kill feed display
List<PlayerRef> getBroadcastTargets()Returns the mutable list of players who will receive the kill feed message

From DeathSystems.KillFeed:

// 1. Get killer's display name
KillFeedEvent.KillerMessage killerEvent = new KillFeedEvent.KillerMessage(damage, deceasedRef);
store.invoke(killerRef, killerEvent); // dispatched TO killer entity
if (killerEvent.isCancelled()) return;
Message killerName = killerEvent.getMessage();
// 2. Get deceased's display name
KillFeedEvent.DecedentMessage decedentEvent = new KillFeedEvent.DecedentMessage(damage);
store.invoke(deceasedRef, decedentEvent); // dispatched TO deceased entity
if (decedentEvent.isCancelled()) return;
Message decedentName = decedentEvent.getMessage();
// 3. NPCs cancel DecedentMessage (NPC deaths don't show in feed)
// players set their display name via DisplayNameComponent

Package: com.hypixel.hytale.server.core.modules.i18n.event

Fired by /i18n gen command to collect translation keys.

Class: com.hypixel.hytale.server.core.modules.i18n.event.GenerateDefaultLanguageEvent

FieldTypeDescription
translationFilesConcurrentHashMap<String, TranslationMap>Collected translations

Methods:

SignatureDescription
void putTranslationFile(String filename, TranslationMap translations)Adds a translation file to the collection

Fired when translations are hot-reloaded or dynamically added.

Class: com.hypixel.hytale.server.core.modules.i18n.event.MessagesUpdated

FieldTypeDescription
changedMessagesMap<String, Map<String, String>>Language -> key/value changes
removedMessagesMap<String, Map<String, String>>Language -> removed keys

Methods:

SignatureDescription
Map<String, Map<String, String>> getChangedMessages()Returns the map of changed translation messages (language code -> key/value pairs)
Map<String, Map<String, String>> getRemovedMessages()Returns the map of removed translation messages (language code -> key/value pairs)
events.register(MessagesUpdated.class, event -> {
// push translation updates to connected editor clients
for (EditorClient client : connectedClients) {
UpdateTranslations[] packets = i18nModule.getUpdatePacketsForChanges(
client.getLanguage(),
event.getChangedMessages(),
event.getRemovedMessages()
);
client.send(packets);
}
});

Package: com.hypixel.hytale.server.core.modules.singleplayer

Fired when a client requests singleplayer access.

Class: com.hypixel.hytale.server.core.modules.singleplayer.SingleplayerRequestAccessEvent

FieldTypeDescription
accessAccessThe access data from the request

Methods:

SignatureDescription
Access getAccess()Returns the access data from the singleplayer request