fix: command remove error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-11-04 20:21:31 +08:00
parent 221b821085
commit 3cbc101eff
2 changed files with 9 additions and 11 deletions

View File

@@ -9,11 +9,11 @@ import { SpongeCommand } from './command';
import { SpongeTaskManager } from './task';
let SpongeServerType = 'sponge';
let Sponge = Java.type("org.spongepowered.api.Sponge");
let Sponge = org.spongepowered.api.Sponge;
container.bind(server.Console).toConstantValue(SpongeConsole);
container.bind(server.ServerType).toConstantValue(SpongeServerType);
container.bind(plugin.PluginInstance).toConstantValue(Sponge.pluginManager.getPlugin('MiaoScript').orElse(null));
container.bind(plugin.PluginInstance).toConstantValue(Sponge.getPluginManager().getPlugin('MiaoScript').orElse(null));
container.bind(event.Event).to(SpongeEvent).inSingletonScope();
container.bind(command.Command).to(SpongeCommand).inSingletonScope();