/** * Check the relevant permission for this command with the provided source, * throwing an exception if the source does not have permission to use * the command. * * @param source The source to check * @throws CommandException if the source does not have permission */ public void checkPermission(CommandSource source) throws CommandException { checkNotNull(source, "source"); if (!testPermission(source)) { throw new CommandPermissionException(); } }
/** * Check the relevant permission for this command with the provided source, throwing an exception if the source does not have permission to use * the command. * * @param source The source to check * @throws CommandException if the source does not have permission */ public void checkPermission(CommandSource source) throws CommandException { checkNotNull(source, "source"); if (!testPermission(source)) { throw new CommandPermissionException(); } }