Class PermissionUtils

java.lang.Object
org.geysermc.geyser.platform.neoforge.PermissionUtils

public class PermissionUtils extends Object
Common logic for handling the more complicated way we have to register permission on NeoForge
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    register(String permission, org.geysermc.geyser.api.util.TriState permissionDefault, net.neoforged.neoforge.server.permission.events.PermissionGatherEvent.Nodes event)
    Registers the given permission and its default value to the event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • register

      public static boolean register(String permission, org.geysermc.geyser.api.util.TriState permissionDefault, net.neoforged.neoforge.server.permission.events.PermissionGatherEvent.Nodes event)
      Registers the given permission and its default value to the event. If the permission has the same name as one that has already been registered to the event, it will not be registered. In other words, it will not override.
      Parameters:
      permission - the permission to register
      permissionDefault - the permission's default value. See GeyserRegisterPermissionsEvent.register(String, TriState) for TriState meanings.
      event - the registration event
      Returns:
      true if the permission was registered