2019-09-10 09:21:27 +00:00
|
|
|
import { server, plugin, command } from '@ms/api'
|
2019-09-07 04:23:15 +00:00
|
|
|
import { DefaultContainer as container } from '@ms/container'
|
|
|
|
|
|
|
|
import { BukkitConsole } from './console'
|
2019-09-10 09:21:27 +00:00
|
|
|
import { BukkitCommand } from './command';
|
2019-09-07 04:23:15 +00:00
|
|
|
|
|
|
|
let BukkitServerType = 'bukkit';
|
|
|
|
let Bukkit = Java.type("org.bukkit.Bukkit");
|
|
|
|
|
|
|
|
container.bind(server.Console).toConstantValue(BukkitConsole);
|
|
|
|
container.bind(server.ServerType).toConstantValue(BukkitServerType);
|
|
|
|
container.bind(plugin.PluginInstance).toConstantValue(Bukkit.pluginManager.getPlugin('MiaoScript'));
|
2019-09-10 09:21:27 +00:00
|
|
|
|
|
|
|
container.bind(command.Command).to(BukkitCommand).inSingletonScope();
|