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
IBaseEvent<KeyType>
├── IEvent<KeyType> (synchronous)
│ ├── PlayerEvent<KeyType>
│ ├── PlayerRefEvent<KeyType>
│ └── EntityEvent<EntityType, KeyType>
├── IAsyncEvent<KeyType> (asynchronous)
│ └── PlayerChatEvent
└── EcsEvent (ECS system events)
└── CancellableEcsEvent
ICancellable (mixin)
└── ICancellableEcsEvent (mixin for ECS)
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 String getUsername();
public UUID getUuid();
public Auth getAuth();
public ReferralData getReferralData();
public InetSocketAddress getReferralSource();
public ClientReferral getClientReferral();
// Cancellation
public void setCancelled(boolean cancelled);
public boolean isCancelled();
public void setReason(String reason);
}
public class PlayerConnectEvent implements IEvent<Void> {
public Holder<EntityStore> getHolder();
public PlayerRef getPlayerRef();
public World getWorld();
public void setWorld(World world);
}
public class PlayerDisconnectEvent extends PlayerRefEvent<Void> {
public PlayerRef getPlayerRef();
public DisconnectReason getDisconnectReason();
}
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 Collection<PlayerRef> getTargets();
public void setTargets(Collection<PlayerRef> targets);
public String getContent();
public void setContent(String content);
public ChatFormatter getFormatter();
public void setFormatter(ChatFormatter formatter);
// Cancellation
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class PlayerMouseButtonEvent extends PlayerEvent<Void> implements ICancellable {
public PlayerRef getPlayerRef();
public float getClientUseTime();
public ItemStack getItemInHand();
public TargetBlock getTargetBlock();
public TargetEntity getTargetEntity();
public Vector2f getScreenPoint();
public MouseButton getMouseButton();
}
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 TargetBlock getTargetBlock();
public BlockType getBlockType();
// From CancellableEcsEvent
public void setCancelled(boolean cancelled);
public boolean isCancelled();
}
public class PlaceBlockEvent extends CancellableEcsEvent {
public ItemStack getItemInHand();
public TargetBlock getTargetBlock();
public byte getRotation();
public void setRotation(byte rotation);
}
public class DamageBlockEvent extends CancellableEcsEvent {
public ItemStack getItemInHand();
public TargetBlock getTargetBlock();
public BlockType getBlockType();
public float getCurrentDamage();
public float getDamage();
public void setDamage(float damage);
}
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 float getThrowSpeed();
public void setThrowSpeed(float speed);
}
public class SwitchActiveSlotEvent extends CancellableEcsEvent {
public short getPreviousSlot();
public short getNewSlot();
public String getInventorySectionId();
public boolean isServerRequest();
}
EventCancellableDescription
CraftRecipeEvent.PreYesBefore crafting
CraftRecipeEvent.PostYesAfter crafting
public abstract class CraftRecipeEvent extends CancellableEcsEvent {
public CraftingRecipe getCraftedRecipe();
public int getQuantity();
public static class Pre extends CraftRecipeEvent { }
public static class Post extends CraftRecipeEvent { }
}
EventCancellableDescription
DiscoverZoneEvent.DisplayYesZone discovery display
EventCancellableDescription
ChangeGameModeEventYesGame mode change
public class ChangeGameModeEvent extends CancellableEcsEvent {
public GameMode getGameMode();
}
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
PlayerGroupEvent.AddedNoAdded to group
PlayerGroupEvent.RemovedNoRemoved from group
public static class PermissionsAdded extends PlayerPermissionChangeEvent {
public UUID getPlayerUuid();
public Set<String> getAddedPermissions();
}
public static class PermissionsRemoved extends PlayerPermissionChangeEvent {
public UUID getPlayerUuid();
public Set<String> getRemovedPermissions();
}
EventCancellableDescription
GroupPermissionChangeEvent.AddedNoPermissions added to group
GroupPermissionChangeEvent.RemovedNoPermissions removed from group
public static class Added extends GroupPermissionChangeEvent {
public String getGroupName();
public Set<String> getAddedPermissions();
}
EventCancellableDescription
BootEventNoServer boot complete
ShutdownEventNoServer shutdown
public class ShutdownEvent implements IEvent<Void> {
public static final int DISCONNECT_PLAYERS = -48;
public static final int UNBIND_LISTENERS = -40;
public static final int 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 Events60
Lifecycle Events20
Total3517
EventReplacement
PlayerInteractEventUse ECS events
PlayerCraftEventUse CraftRecipeEvent.Pre/Post
LivingEntityUseBlockEventUse UseBlockEvent
PrepareUniverseEvent(none)