init project
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user