Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-09 21:10:05 +01:00
Add isInitialized method to PermissionsResolverManager for an easy way to check if the PermissionsResolverManager has been initialized
Dieser Commit ist enthalten in:
Ursprung
cd64ca459d
Commit
b938aa0be3
@ -64,13 +64,17 @@ public class PermissionsResolverManager implements PermissionsResolver {
|
||||
private static PermissionsResolverManager instance;
|
||||
|
||||
public static void initialize(Plugin plugin) {
|
||||
if (instance == null) {
|
||||
if (!isInitialized()) {
|
||||
instance = new PermissionsResolverManager(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isInitialized() {
|
||||
return instance != null;
|
||||
}
|
||||
|
||||
public static PermissionsResolverManager getInstance() {
|
||||
if (instance == null) {
|
||||
if (!isInitialized()) {
|
||||
throw new WEPIFRuntimeException("WEPIF has not yet been initialized!");
|
||||
}
|
||||
return instance;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren