23 lines
554 B
Java
23 lines
554 B
Java
package com.alttd.cometskyblock;
|
|
|
|
import org.jetbrains.annotations.ApiStatus;
|
|
|
|
public interface CometSkyBlockAPI {
|
|
|
|
static CometSkyBlockAPI get() {
|
|
return Provider.instance;
|
|
}
|
|
|
|
final class Provider {
|
|
private static CometSkyBlockAPI instance = null;
|
|
|
|
@ApiStatus.Internal
|
|
static void register(CometSkyBlockAPI instance) {
|
|
if (Provider.instance != null)
|
|
throw new UnsupportedOperationException("Cannot redefine singleton");
|
|
|
|
Provider.instance = instance;
|
|
}
|
|
}
|
|
}
|