diff --git a/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java b/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java index 070bae8ce..052574e52 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java @@ -47,7 +47,8 @@ public class MethodWrapper { try { return returnType.cast(with.usingOn(extension, method)); } catch (InvocationTargetException notReadyToBeCalled) { - if (notReadyToBeCalled.getCause() instanceof NotReadyException) { + if (notReadyToBeCalled.getCause() instanceof NotReadyException + || notReadyToBeCalled.getCause() instanceof UnsupportedOperationException) { return null; // Data or API not available to make the call. } else { throw new IllegalArgumentException(method.getDeclaringClass() + " method " + method.getName() + " could not be called: " + notReadyToBeCalled.getMessage(), notReadyToBeCalled); diff --git a/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java b/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java index 6c7f1cd48..27fbb198e 100644 --- a/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java +++ b/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java @@ -140,7 +140,7 @@ public class ExtensionRegister { try { // Creates the extension with factory and registers it createExtension.apply(factory).ifPresent(this::register); - } catch (NotReadyException ignore) { + } catch (NotReadyException | UnsupportedOperationException ignore) { // This exception signals that the extension can not be registered right now (Intended fail). } catch (Exception | NoClassDefFoundError | IncompatibleClassChangeError e) { // Places all exceptions to one exception with plugin information so that they can be reported. @@ -155,7 +155,7 @@ public class ExtensionRegister { try { // Creates the extension with factory and registers it createExtension.apply(factory).forEach(this::register); - } catch (NotReadyException ignore) { + } catch (NotReadyException | UnsupportedOperationException ignore) { // This exception signals that the extension can not be registered right now (Intended fail). } catch (Exception | NoClassDefFoundError | IncompatibleClassChangeError e) { // Places all exceptions to one exception with plugin information so that they can be reported. @@ -173,7 +173,7 @@ public class ExtensionRegister { createExtension.apply(factory) .flatMap(this::register) .ifPresent(caller -> registerListener.accept(factory, caller)); - } catch (NotReadyException ignore) { + } catch (NotReadyException | UnsupportedOperationException ignore) { // This exception signals that the extension can not be registered right now (Intended fail). } catch (Exception | NoClassDefFoundError | IncompatibleClassChangeError e) { // Places all exceptions to one exception with plugin information so that they can be reported.