Package net.minecraftforge.debug
Class PermissionTest
java.lang.Object
net.minecraftforge.debug.PermissionTest
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final PermissionNode<Boolean>
private static final PermissionNode<Component>
private static final boolean
private static final PermissionNode<Integer>
private static final org.apache.logging.log4j.Logger
private static final PermissionNode<String>
private static final PermissionNode<Boolean>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
canUseCommand
(CommandSourceStack src, PermissionNode<Boolean> booleanPermission, PermissionDynamicContext<?>... context) Simple utility to catch exceptions with the test commands above.void
void
-
Field Details
-
ENABLED
private static final boolean ENABLED- See Also:
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
boolPerm
-
stringPerm
-
intPerm
-
componentPerm
-
unregisteredPerm
-
-
Constructor Details
-
PermissionTest
public PermissionTest()
-
-
Method Details
-
registerNodes
-
registerCommands
-
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.
-