Skip to content

GroupPermissionChangeEvent

Package: com.hypixel.hytale.server.core.event.events.permissions Implements: IEvent<Void> Cancellable: No

Abstract 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.

FieldTypeAccessorMutableNullable
groupNameStringgetGroupName()NoNo
  • groupName — The name of the permission group that was modified.

Dispatched when permissions are added to a group.

FieldTypeAccessorMutableNullable
groupNameStringgetGroupName()NoNo
addedPermissionsSet<String>getAddedPermissions()NoNo
  • addedPermissions — The set of permission strings that were added to the group. Returned as an unmodifiable set.

Fired by: PermissionsModule.addGroupPermission() (line 110) via eventBus dispatch.

Dispatched when permissions are removed from a group.

FieldTypeAccessorMutableNullable
groupNameStringgetGroupName()NoNo
removedPermissionsSet<String>getRemovedPermissions()NoNo
  • removedPermissions — The set of permission strings that were removed from the group. Returned as an unmodifiable set.

Fired by: PermissionsModule.removeGroupPermission() (line 118) via eventBus dispatch.

// Listen for permissions added to a group
getEventRegistry().register(GroupPermissionChangeEvent.Added.class, event -> {
String group = event.getGroupName();
Set<String> added = event.getAddedPermissions();
// Handle new group permissions
});
// Listen for permissions removed from a group
getEventRegistry().register(GroupPermissionChangeEvent.Removed.class, event -> {
String group = event.getGroupName();
Set<String> removed = event.getRemovedPermissions();
// Handle removed group permissions
});
  • 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.