@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
28 lines (27 loc) • 1.49 kB
TypeScript
/**
* Handles WebSocket server commands for connecting to Minecraft game instances.
*
* This module manages the MinecraftWebSocketServer that allows the Electron app
* to communicate with running Minecraft instances via WebSocket protocol.
*/
import { BrowserWindow, IpcMain } from "electron";
import MinecraftWebSocketServer from "../local/MinecraftWebSocketServer";
import LocalEnvironment from "../local/LocalEnvironment";
export declare class WebSocketCommandHandler {
private _window;
private _ipcMain;
private _wss;
private _localUtilities;
private _env;
constructor(browserWindow: BrowserWindow, incomingIpcMain: IpcMain, env: LocalEnvironment);
webSocketCommand(_event: Electron.IpcMainInvokeEvent, data: string): void;
startServer(_event: Electron.IpcMainInvokeEvent, data: string): Promise<void>;
stopServer(_event: Electron.IpcMainInvokeEvent, data: string): Promise<void>;
getMinecraftGameProjectPath(_event: Electron.IpcMainInvokeEvent, data: string): Promise<void>;
getMinecraftGameWorldPath(_event: Electron.IpcMainInvokeEvent, data: string): Promise<void>;
handleEventReceived(_server: MinecraftWebSocketServer, req: any): void;
handleCommandCompleted(_server: MinecraftWebSocketServer, req: any): void;
handleClientConnected(_server: MinecraftWebSocketServer, _message: any): void;
handleClientDisconnected(_server: MinecraftWebSocketServer, _message: any): void;
}
export default WebSocketCommandHandler;