Class PermissionTest

java.lang.Object
net.minecraftforge.debug.PermissionTest

public class PermissionTest extends Object
  • Field Details

  • Constructor Details

    • PermissionTest

      public PermissionTest()
  • Method Details

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