Exceptions
Introduction
The Polar API defines three exceptions in the top.polar.api.exception package.
PolarNotLoadedException
public class PolarNotLoadedException extends Exception
A checked exception thrown by PolarApiAccessor#access() when Polar is not loaded. Callers must handle it.
ObjectAccessException
public class ObjectAccessException extends RuntimeException
An unchecked exception thrown by any API interface method when the wrapped Polar object is no longer accessible, for example because the player has disconnected or the object was garbage collected. This is the reason API interfaces should not be stored long-term; see the remarks in the API Overview.
LoaderAccessViolationException
public class LoaderAccessViolationException extends RuntimeException
An unchecked exception thrown by the stub LoaderApi bundled in the API artifact. Encountering it means the loader's real implementation was not used, typically because the API was shaded into the plugin.