Skip to content

Event Catalog

Complete catalog of all events in the Hytale server, organized by category.

  • Base Interfaces: com.hypixel.hytale.event
  • Player Events: com.hypixel.hytale.server.core.event.events.player
  • ECS Events: com.hypixel.hytale.server.core.event.events.ecs
  • Entity Events: com.hypixel.hytale.server.core.event.events.entity
  • Permission Events: com.hypixel.hytale.server.core.event.events.permissions
  • Lifecycle Events: com.hypixel.hytale.server.core.event.events
flowchart TD
    subgraph BaseEvents["Base Event Interfaces"]
        IBaseEvent["IBaseEvent<KeyType>"]
    end

    subgraph SyncEvents["Synchronous Events"]
        IEvent["IEvent<KeyType>"]
        PlayerEvent["PlayerEvent<KeyType>"]
        PlayerRefEvent["PlayerRefEvent<KeyType>"]
        EntityEvent["EntityEvent<EntityType, KeyType>"]
    end

    subgraph AsyncEvents["Asynchronous Events"]
        IAsyncEvent["IAsyncEvent<KeyType>"]
        PlayerChatEvent
    end

    subgraph ECSEvents["ECS Events"]
        EcsEvent
        CancellableEcsEvent
    end

    subgraph Mixins["Cancellation Mixins"]
        ICancellable
        ICancellableEcsEvent
    end

    IBaseEvent --> IEvent
    IBaseEvent --> IAsyncEvent
    IBaseEvent --> EcsEvent

    IEvent --> PlayerEvent
    IEvent --> PlayerRefEvent
    IEvent --> EntityEvent

    IAsyncEvent --> PlayerChatEvent

    EcsEvent --> CancellableEcsEvent

    ICancellable --> ICancellableEcsEvent
EventCancellableDescription
PlayerSetupConnectEventYesEarly connection before entity creation
PlayerConnectEventNoPlayer connected, entity available
PlayerReadyEventNoPlayer fully ready to play
AddPlayerToWorldEventNoPlayer being added to world
PlayerDisconnectEventNoPlayer disconnecting
PlayerSetupDisconnectEventNoEarly disconnection during setup
DrainPlayerFromWorldEventNoPlayer being removed from world
public class PlayerSetupConnectEvent implements IEvent<Void>, ICancellable {
public PacketHandler getPacketHandler();
public String getUsername();
public UUID getUuid();
public PlayerAuthentication getAuth();
public byte[] getReferralData();
public boolean isReferralConnection();
public HostAddress getReferralSource();
public ClientReferral getClientReferral();
public void referToServer(String host, int port);
public void referToServer(String host, int port, byte[] data);
public String getReason();
public void setReason(String reason);
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class PlayerConnectEvent implements IEvent<Void> {
public Holder<EntityStore> getHolder();
public PlayerRef getPlayerRef();
public World getWorld();
public void setWorld(World world);
}
public class PlayerReadyEvent extends PlayerEvent<String> {
public int getReadyId();
}
public class AddPlayerToWorldEvent implements IEvent<String> {
public Holder<EntityStore> getHolder();
public World getWorld();
public boolean shouldBroadcastJoinMessage();
public void setBroadcastJoinMessage(boolean broadcastJoinMessage);
}
public class PlayerDisconnectEvent extends PlayerRefEvent<Void> {
public PlayerRef getPlayerRef();
public PacketHandler.DisconnectReason getDisconnectReason();
}
public class PlayerSetupDisconnectEvent implements IEvent<Void> {
public String getUsername();
public UUID getUuid();
public PlayerAuthentication getAuth();
public PacketHandler.DisconnectReason getDisconnectReason();
}
public class DrainPlayerFromWorldEvent implements IEvent<String> {
public Holder<EntityStore> getHolder();
public World getWorld();
public void setWorld(World world);
public Transform getTransform();
public void setTransform(Transform transform);
}
EventCancellableDescription
PlayerChatEventYesChat message (async)
PlayerMouseButtonEventYesMouse button click
PlayerMouseMotionEventYesMouse movement
PlayerInteractEventYesPlayer interaction (deprecated)
PlayerCraftEventNoCrafting (deprecated)
public class PlayerChatEvent implements IAsyncEvent<String>, ICancellable {
public PlayerRef getSender();
public void setSender(PlayerRef sender);
public List<PlayerRef> getTargets();
public void setTargets(List<PlayerRef> targets);
public String getContent();
public void setContent(String content);
public PlayerChatEvent.Formatter getFormatter();
public void setFormatter(PlayerChatEvent.Formatter formatter);
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class PlayerMouseButtonEvent extends PlayerEvent<Void> implements ICancellable {
public PlayerRef getPlayerRefComponent();
public long getClientUseTime();
public Item getItemInHand();
public Vector3i getTargetBlock();
public Entity getTargetEntity();
public Vector2f getScreenPoint();
public MouseButtonEvent getMouseButton();
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class PlayerMouseMotionEvent extends PlayerEvent<Void> implements ICancellable {
public long getClientUseTime();
public Item getItemInHand();
public Vector3i getTargetBlock();
public Entity getTargetEntity();
public Vector2f getScreenPoint();
public MouseMotionEvent getMouseMotion();
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
EventCancellableDescription
BreakBlockEventYesBlock being broken
PlaceBlockEventYesBlock being placed
DamageBlockEventYesBlock taking damage
UseBlockEvent.PreYesBefore block usage
UseBlockEvent.PostNoAfter block usage
public class BreakBlockEvent extends CancellableEcsEvent {
public ItemStack getItemInHand();
public Vector3i getTargetBlock();
public void setTargetBlock(Vector3i targetBlock);
public BlockType getBlockType();
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class PlaceBlockEvent extends CancellableEcsEvent {
public ItemStack getItemInHand();
public Vector3i getTargetBlock();
public void setTargetBlock(Vector3i targetBlock);
public RotationTuple getRotation();
public void setRotation(RotationTuple rotation);
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class DamageBlockEvent extends CancellableEcsEvent {
public ItemStack getItemInHand();
public Vector3i getTargetBlock();
public void setTargetBlock(Vector3i targetBlock);
public BlockType getBlockType();
public float getCurrentDamage();
public float getDamage();
public void setDamage(float damage);
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public abstract class UseBlockEvent extends EcsEvent {
public InteractionType getInteractionType();
public InteractionContext getContext();
public Vector3i getTargetBlock();
public BlockType getBlockType();
public static final class Pre extends UseBlockEvent implements ICancellableEcsEvent {
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public static final class Post extends UseBlockEvent { }
}
EventCancellableDescription
DropItemEvent.DropYesItem being dropped
DropItemEvent.PlayerRequestYesPlayer drop request
InteractivelyPickupItemEventYesItem being picked up
SwitchActiveSlotEventYesActive slot changing
public static class Drop extends DropItemEvent {
public ItemStack getItemStack();
public void setItemStack(ItemStack itemStack);
public float getThrowSpeed();
public void setThrowSpeed(float speed);
}
public static class PlayerRequest extends DropItemEvent {
public int getInventorySectionId();
public short getSlotId();
}
public class InteractivelyPickupItemEvent extends CancellableEcsEvent {
public ItemStack getItemStack();
public void setItemStack(ItemStack itemStack);
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class SwitchActiveSlotEvent extends CancellableEcsEvent {
public int getPreviousSlot();
public byte getNewSlot();
public void setNewSlot(byte newSlot);
public int getInventorySectionId();
public boolean isServerRequest();
public boolean isClientRequest();
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
EventCancellableDescription
CraftRecipeEvent.PreYesBefore crafting
CraftRecipeEvent.PostYesAfter crafting
public abstract class CraftRecipeEvent extends CancellableEcsEvent {
public CraftingRecipe getCraftedRecipe();
public int getQuantity();
public static final class Pre extends CraftRecipeEvent { }
public static final class Post extends CraftRecipeEvent { }
}
EventCancellableDescription
DiscoverZoneEvent.DisplayYesZone discovery display
public abstract class DiscoverZoneEvent extends EcsEvent {
public WorldMapTracker.ZoneDiscoveryInfo getDiscoveryInfo();
public static class Display extends DiscoverZoneEvent implements ICancellableEcsEvent {
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
}
EventCancellableDescription
ChangeGameModeEventYesGame mode change
public class ChangeGameModeEvent extends CancellableEcsEvent {
public GameMode getGameMode();
public void setGameMode(GameMode gameMode);
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
EventCancellableDescription
EntityRemoveEventNoEntity being removed
LivingEntityInventoryChangeEventNoInventory change
public class EntityRemoveEvent extends EntityEvent<Entity, String> {
public Entity getEntity();
}
public class LivingEntityInventoryChangeEvent extends EntityEvent<LivingEntity, String> {
public LivingEntity getEntity();
public ItemContainer getItemContainer();
public Transaction getTransaction();
}
EventCancellableDescription
PlayerPermissionChangeEvent.PermissionsAddedNoPermissions granted
PlayerPermissionChangeEvent.PermissionsRemovedNoPermissions revoked
PlayerPermissionChangeEvent.GroupAddedNoPlayer added to permission group (via change event)
PlayerPermissionChangeEvent.GroupRemovedNoPlayer removed from permission group (via change event)
PlayerGroupEvent.AddedNoAdded to group
PlayerGroupEvent.RemovedNoRemoved from group
public abstract class PlayerPermissionChangeEvent implements IEvent<Void> {
public UUID getPlayerUuid();
public static class PermissionsAdded extends PlayerPermissionChangeEvent {
public Set<String> getAddedPermissions();
}
public static class PermissionsRemoved extends PlayerPermissionChangeEvent {
public Set<String> getRemovedPermissions();
}
public static class GroupAdded extends PlayerPermissionChangeEvent {
public String getGroupName();
}
public static class GroupRemoved extends PlayerPermissionChangeEvent {
public String getGroupName();
}
}
public class PlayerGroupEvent extends PlayerPermissionChangeEvent {
public UUID getPlayerUuid();
public String getGroupName();
public static class Added extends PlayerGroupEvent { }
public static class Removed extends PlayerGroupEvent { }
}
EventCancellableDescription
GroupPermissionChangeEvent.AddedNoPermissions added to group
GroupPermissionChangeEvent.RemovedNoPermissions removed from group
public abstract class GroupPermissionChangeEvent implements IEvent<Void> {
public String getGroupName();
public static class Added extends GroupPermissionChangeEvent {
public Set<String> getAddedPermissions();
}
public static class Removed extends GroupPermissionChangeEvent {
public Set<String> getRemovedPermissions();
}
}
EventCancellableDescription
BootEventNoServer boot complete
ShutdownEventNoServer shutdown
public class ShutdownEvent implements IEvent<Void> {
public static final short DISCONNECT_PLAYERS = -48;
public static final short UNBIND_LISTENERS = -40;
public static final short SHUTDOWN_WORLDS = -32;
}
@Override
protected void setup() {
getEventRegistry().register(PlayerConnectEvent.class,
event -> {
PlayerRef player = event.getPlayerRef();
getLogger().info("Player connected: " + player.getUsername());
}
);
}
getEventRegistry().register(
EventPriority.EARLY,
PlayerChatEvent.class,
event -> {
// Process early in chain
}
);
getEventRegistry().register(BreakBlockEvent.class,
event -> {
if (isProtectedBlock(event.getTargetBlock())) {
event.setCancelled(true);
}
}
);
getEventRegistry().register(PlayerChatEvent.class,
event -> {
// Runs on async thread
String filtered = filterMessage(event.getContent());
event.setContent(filtered);
}
);
CategoryCountCancellable
Player Connection71
Player Actions54
Block Events54
Item Events44
Crafting Events22
Exploration Events11
Gameplay Events11
Entity Events20
Permission Events80
Lifecycle Events20
Total3717
EventReplacement
PlayerInteractEventUse ECS events
PlayerCraftEventUse CraftRecipeEvent.Pre/Post
LivingEntityUseBlockEventUse UseBlockEvent
PrepareUniverseEvent(none)