mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Re-use command manager service.
This commit is contained in:
parent
31d4daf474
commit
c169d8f258
@ -151,6 +151,7 @@ public final class PlatformCommandManager {
|
|||||||
|
|
||||||
private final WorldEdit worldEdit;
|
private final WorldEdit worldEdit;
|
||||||
private final PlatformManager platformManager;
|
private final PlatformManager platformManager;
|
||||||
|
private final CommandManagerServiceImpl commandManagerService;
|
||||||
private final CommandManager commandManager;
|
private final CommandManager commandManager;
|
||||||
private final InjectedValueStore globalInjectedValues;
|
private final InjectedValueStore globalInjectedValues;
|
||||||
private final DynamicStreamHandler dynamicHandler = new DynamicStreamHandler();
|
private final DynamicStreamHandler dynamicHandler = new DynamicStreamHandler();
|
||||||
@ -168,7 +169,8 @@ public final class PlatformCommandManager {
|
|||||||
this.worldEdit = worldEdit;
|
this.worldEdit = worldEdit;
|
||||||
this.platformManager = platformManager;
|
this.platformManager = platformManager;
|
||||||
this.exceptionConverter = new WorldEditExceptionConverter(worldEdit);
|
this.exceptionConverter = new WorldEditExceptionConverter(worldEdit);
|
||||||
this.commandManager = new CommandManagerServiceImpl().newCommandManager();
|
this.commandManagerService = new CommandManagerServiceImpl();
|
||||||
|
this.commandManager = commandManagerService.newCommandManager();
|
||||||
this.globalInjectedValues = MapBackedValueStore.create();
|
this.globalInjectedValues = MapBackedValueStore.create();
|
||||||
this.registration = new CommandRegistrationHandler(
|
this.registration = new CommandRegistrationHandler(
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
@ -253,8 +255,7 @@ public final class PlatformCommandManager {
|
|||||||
cmd.description(TextComponent.of(desc));
|
cmd.description(TextComponent.of(desc));
|
||||||
cmd.action(Command.Action.NULL_ACTION);
|
cmd.action(Command.Action.NULL_ACTION);
|
||||||
|
|
||||||
CommandManager manager = DefaultCommandManagerService.getInstance()
|
CommandManager manager = commandManagerService.newCommandManager();
|
||||||
.newCommandManager();
|
|
||||||
this.registration.register(
|
this.registration.register(
|
||||||
manager,
|
manager,
|
||||||
registration,
|
registration,
|
||||||
|
Loading…
Reference in New Issue
Block a user