mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Clarify state when asking for caps with no platforms
This commit is contained in:
parent
862b63d43a
commit
2f8bdccf65
@ -167,7 +167,12 @@ public class PlatformManager {
|
|||||||
return platform;
|
return platform;
|
||||||
} else {
|
} else {
|
||||||
if (preferences.isEmpty()) {
|
if (preferences.isEmpty()) {
|
||||||
return platforms.get(0); // Use the first available if preferences have not been decided yet.
|
// Use the first available if preferences have not been decided yet.
|
||||||
|
if (platforms.isEmpty()) {
|
||||||
|
// No platforms registered, this is being called too early!
|
||||||
|
throw new NoCapablePlatformException("No platforms have been registered yet! Please wait until WorldEdit is initialized.");
|
||||||
|
}
|
||||||
|
return platforms.get(0);
|
||||||
}
|
}
|
||||||
throw new NoCapablePlatformException("No platform was found supporting " + capability.name());
|
throw new NoCapablePlatformException("No platform was found supporting " + capability.name());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user