类 PermissionTest
java.lang.Object
net.neoforged.neoforge.oldtest.PermissionTest
-
字段概要
字段修饰符和类型字段说明private 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> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static boolean
canUseCommand
(CommandSourceStack src, PermissionNode<Boolean> booleanPermission, PermissionDynamicContext<?>... context) Simple utility to catch exceptions with the test commands above.void
void
-
字段详细资料
-
ENABLED
private static final boolean ENABLED- 另请参阅:
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
boolPerm
-
stringPerm
-
intPerm
-
componentPerm
-
unregisteredPerm
-
-
构造器详细资料
-
PermissionTest
public PermissionTest()
-
-
方法详细资料
-
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.
-