Class UnsafeCallWrapper


  • public class UnsafeCallWrapper
    extends java.lang.Object
    Wraps calls that could result in exceptions that are not Multiverse's fault.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T wrap​(java.util.concurrent.Callable<T> callable, java.lang.String plugin, java.lang.String action, java.lang.Object... formatArgs)
      Wraps calls that could result in exceptions that are not Multiverse's fault.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnsafeCallWrapper

        public UnsafeCallWrapper​(Core core)
    • Method Detail

      • wrap

        public <T> T wrap​(java.util.concurrent.Callable<T> callable,
                          java.lang.String plugin,
                          java.lang.String action,
                          java.lang.Object... formatArgs)
        Wraps calls that could result in exceptions that are not Multiverse's fault.
        Type Parameters:
        T - The type of the return value.
        Parameters:
        callable - The potentially unsafe call.
        plugin - The plugin that's probably the culprit.
        action - What MV was attempting to do (error message, format string).
        formatArgs - The formatting arguments for the error message. The exception that was thrown will be appended to these objects.
        Returns:
        The return value or null if the call failed.