类 PermissionTest

java.lang.Object
net.neoforged.neoforge.oldtest.PermissionTest

public class PermissionTest extends Object
  • 字段详细资料

  • 构造器详细资料

    • PermissionTest

      public PermissionTest()
  • 方法详细资料

    • registerNodes

      public void registerNodes(PermissionGatherEvent.Nodes event)
    • registerCommands

      public void registerCommands(RegisterCommandsEvent event)
    • canUseCommand

      private static boolean canUseCommand(CommandSourceStack src, PermissionNode<Boolean> booleanPermission, PermissionDynamicContext<?>... context)
      Simple utility to catch exceptions with the test commands above. Without that, the expected UnregisteredPermissionNode exception, triggers further exceptions and therefore isn't visible anymore. This is only required to handle the intended error in the permission API, and should not be necessary with correct use.