Class PermissionsChangedEvent

All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class PermissionsChangedEvent extends PlayerEvent implements net.neoforged.bus.api.ICancellableEvent
This event will fire when the player is opped or deopped.

This event is cancelable which will stop the op or deop from happening.

  • Field Details

    • newLevel

      private final int newLevel
    • oldLevel

      private final int oldLevel
  • Constructor Details

    • PermissionsChangedEvent

      public PermissionsChangedEvent(ServerPlayer player, int newLevel, int oldLevel)
  • Method Details

    • getNewLevel

      public int getNewLevel()
      Returns:
      The new permission level.
    • getOldLevel

      public int getOldLevel()
      Returns:
      The old permission level.