use of com.sk89q.worldedit.extension.platform.PlatformManager in project FastAsyncWorldEdit by IntellectualSites.
the class FabricWorldEdit method registerCommands.
private void registerCommands(CommandDispatcher<ServerCommandSource> dispatcher, boolean dedicated) {
PlatformManager manager = WorldEdit.getInstance().getPlatformManager();
if (manager.getPlatforms().isEmpty()) {
// We'll register as part of our platform initialization later.
return;
}
// This is a re-register (due to /reload), we must add our commands now
Platform commandsPlatform = manager.queryCapability(Capability.USER_COMMANDS);
if (commandsPlatform != platform || !platform.isHookingEvents()) {
// We're not in control of commands/events -- do not re-register.
return;
}
platform.setNativeDispatcher(dispatcher);
platform.registerCommands(manager.getPlatformCommandManager().getCommandManager());
}
Aggregations