import { Connection } from '../../../skychat/Connection.js'; import { GlobalPlugin } from '../../GlobalPlugin.js'; import { User } from '../../../skychat/User.js'; import { RoomManager } from '../../../skychat/RoomManager.js'; /** * Handle cursor events */ export declare class CursorPlugin extends GlobalPlugin { static readonly CURSOR_DECAY_DELAY: number; static readonly defaultDataStorageValue = true; static readonly commandName = "c"; readonly minRight = -1; readonly hidden = true; /** * Recent received cursor positions. Kept for other plugins. */ readonly cursors: { [identifier: string]: { x: number; y: number; lastSent: Date; }; }; readonly rules: { c: { minCount: number; maxCount: number; maxCallsPer10Seconds: number; params: { name: string; pattern: RegExp; }[]; }; }; constructor(manager: RoomManager); run(alias: string, param: string, connection: Connection): Promise; /** * Send a cursor position to all users * @param user * @param x * @param y */ sendCursorPosition(user: User, x: number, y: number, identifierIgnoreList?: string[]): Promise; /** * Remove obsolete cursor entries from cache */ cleanUpCursors(): void; /** * Cursors are sent in binary format to save bandwidth. */ onBinaryDataReceived(connection: Connection, messageType: number, data: Buffer): Promise; }