public CraftServer(cn.nukkit.Server nukkitServer, Logger logger, File pluginFolder) { this.nukkit = Objects.requireNonNull(nukkitServer, "nukkitServer"); this.pluginFolder = Objects.requireNonNull(pluginFolder, "pluginFolder"); this.logger = Objects.requireNonNull(logger, "logger"); this.commandMap = new NotSoSimpleCommandMap(this); this.scheduler = new PokkitScheduler(nukkitServer.getScheduler()); this.pluginManager = new PokkitPluginManager(nukkitServer.getPluginManager(), this.commandMap); this.servicesManager = new SimpleServicesManager(); this.commandFetcher = new PokkitCommandFetcher(nukkitServer::getPluginCommand); this.scoreboardManager = new PokkitScoreboardManager(); this.onlinePlayerData = new OnlinePlayerData(); this.metadataOverview = new AllMetadataStore(); this.pokkitUnsafe = new PokkitUnsafe(); this.itemFactory = new PokkitItemFactory(); this.helpMap = new PokkitHelpMap(); this.messenger = new PokkitPluginMessenger(); PokkitEnchantment.registerNukkitEnchantmentsInBukkit(); }
public PoreServer(org.spongepowered.api.Game handle, org.slf4j.Logger logger) { super(handle.getServer()); this.game = handle; this.logger = Logger.getLogger(logger.getName()); this.commandMap = new PoreCommandMap(this); this.pluginManager = new SimplePluginManager(this, commandMap); this.servicesManager = new SimpleServicesManager(); Bukkit.setServer(this); }