2019-11-07 07:02:05 +00:00
|
|
|
/// <reference types="@ms/types/dist/typings/bukkit" />
|
2019-09-19 10:58:01 +00:00
|
|
|
|
2019-09-21 07:04:25 +00:00
|
|
|
import { server, plugin, command, event, task } from '@ms/api'
|
2019-09-07 04:23:15 +00:00
|
|
|
import { DefaultContainer as container } from '@ms/container'
|
|
|
|
|
2019-09-19 10:58:01 +00:00
|
|
|
import { BukkitConsole } from './console';
|
2019-09-21 07:04:25 +00:00
|
|
|
import { BukkitEvent } from './event';
|
2020-01-14 09:44:20 +00:00
|
|
|
import { BukkitServer } from './server';
|
2019-09-10 09:21:27 +00:00
|
|
|
import { BukkitCommand } from './command';
|
2019-09-21 07:04:25 +00:00
|
|
|
import { BukkitTaskManager } from './task';
|
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
|
|
|
|
2019-09-19 10:58:01 +00:00
|
|
|
container.bind(event.Event).to(BukkitEvent).inSingletonScope();
|
2020-01-14 09:44:20 +00:00
|
|
|
container.bind(server.Server).to(BukkitServer).inSingletonScope();
|
2019-09-10 09:21:27 +00:00
|
|
|
container.bind(command.Command).to(BukkitCommand).inSingletonScope();
|
2019-09-21 07:04:25 +00:00
|
|
|
container.bind(task.TaskManager).to(BukkitTaskManager).inSingletonScope();
|