GroupPermissionChangeEvent
GroupPermissionChangeEvent
Section titled “GroupPermissionChangeEvent”Package:
com.hypixel.hytale.server.core.event.events.permissionsImplements:IEvent<Void>Cancellable: No Key type:Void
Base event for permission changes on a named group. This class is not dispatched directly — its inner classes Added and Removed are the concrete events fired by the permissions system.
This event cannot be cancelled — it is a notification of a change that has already occurred in the permissions module.
Because the key type is Void, this event is dispatched globally — all registered listeners receive it regardless of key.
Fields / Accessors (Base)
Section titled “Fields / Accessors (Base)”| Field | Type | Accessor | Mutable | Notes |
|---|---|---|---|---|
groupName | String | getGroupName() | No | The name of the permission group that was modified. |
Inner Classes
Section titled “Inner Classes”GroupPermissionChangeEvent.Added
Section titled “GroupPermissionChangeEvent.Added”Dispatched when permissions are added to a group.
| Field | Type | Accessor | Mutable | Notes |
|---|---|---|---|---|
groupName | String | getGroupName() | No | Inherited from base class. |
addedPermissions | Set<String> | getAddedPermissions() | No | The set of permission strings that were added to the group. |
Fired by: PermissionsModule.addGroupPermission() (line 110) via eventBus.dispatchFor().
GroupPermissionChangeEvent.Removed
Section titled “GroupPermissionChangeEvent.Removed”Dispatched when permissions are removed from a group.
| Field | Type | Accessor | Mutable | Notes |
|---|---|---|---|---|
groupName | String | getGroupName() | No | Inherited from base class. |
removedPermissions | Set<String> | getRemovedPermissions() | No | The set of permission strings that were removed from the group. |
Fired by: PermissionsModule.removeGroupPermission() (line 118) via eventBus.dispatchFor().
Listening
Section titled “Listening”// Listen for permissions added to a groupgetEventRegistry().register(GroupPermissionChangeEvent.Added.class, event -> { String group = event.getGroupName(); Set<String> added = event.getAddedPermissions(); // Handle new group permissions});
// Listen for permissions removed from a groupgetEventRegistry().register(GroupPermissionChangeEvent.Removed.class, event -> { String group = event.getGroupName(); Set<String> removed = event.getRemovedPermissions(); // Handle removed group permissions});Related Events
Section titled “Related Events”PlayerGroupEvent— fired when a player is added to or removed from a group. This is the player-membership counterpart to group-permission changes.PlayerPermissionChangeEvent— fired when a player’s individual permissions or group memberships change. Part of the broader permissions event cluster.
Permissions Event Flow
Section titled “Permissions Event Flow”GroupPermissionChangeEvent.Added / .Removed -- group's permissions changePlayerGroupEvent.Added / .Removed -- player's group membership changesPlayerPermissionChangeEvent.PermissionsAdded / .PermissionsRemoved -- player's direct permissions changePlayerPermissionChangeEvent.GroupAdded / .GroupRemoved -- player's group membership (alternate view)