This commit is contained in:
Luck
2016-07-21 21:40:24 +01:00
Unverified
parent a413c0a50a
commit b3b687d9b7
31 changed files with 1541 additions and 171 deletions
@@ -0,0 +1,30 @@
package me.lucko.luckperms;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import me.lucko.luckperms.api.LuckPermsApi;
/**
* Static access to LuckPerms
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class LuckPerms {
private static LuckPermsApi api = null;
public static LuckPermsApi getApi() {
if (api == null) {
throw new IllegalStateException("API is not loaded.");
}
return api;
}
static void registerProvider(LuckPermsApi luckPermsApi) {
api = luckPermsApi;
}
static void unregisterProvider() {
api = null;
}
}