Added support for platforms to declare capabilities.

Platforms can declare certain capabilities and a suggested preference
for the platform for each capability. WorldEdit can then choose
the best platform for a given capability.

Examples of capabilities include providing configuration, registering
game hooks/events, performing changes to the world, or checking
permissions/authorization.
This commit is contained in:
sk89q
2014-06-27 01:11:35 -07:00
parent d9cea950b0
commit e52ca6661f
13 changed files with 416 additions and 131 deletions

View File

@ -56,19 +56,11 @@ public class WorldEditCommands {
player.print("https://github.com/sk89q/worldedit/");
PlatformManager pm = we.getPlatformManager();
Platform primary = pm.getPrimaryPlatform();
player.printDebug("");
player.printDebug("Platforms:");
for (Platform platform : pm.getPlatforms()) {
String prefix = "";
if (primary != null && primary.equals(platform)) {
prefix = "[PRIMARY] ";
}
player.printDebug(String.format("- %s%s v%s (WE v%s)",
prefix, platform.getPlatformName(), platform.getPlatformVersion(), platform.getVersion()));
player.printDebug(String.format("- %s v%s (WE v%s)", platform.getPlatformName(), platform.getPlatformVersion(), platform.getVersion()));
}
}