-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.d.ts
57 lines (46 loc) · 1.23 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { EventEmitter } from "events";
import { Bot } from "mineflayer";
export type MapData = Record<number, Buffer>
interface MapSaverOptions {
outputDir?: string
saveToFile?: boolean
saveInternal?: boolean
filePrefix?: string
fileSuffix?: string
}
declare module 'mineflayer-item-map-downloader' {
export function mapDownloader(bot: Bot): void;
export interface MapDownloader extends EventEmitter {
on(event: 'new_map', listener: newMapEventListener): this
activate(): void
deactivate(): void
maps: MapData
saveToFile: boolean
outputDir: string
}
export class MapSaver {
constructor(version: string, options?: MapSaverOptions)
version: string
outputDir: string
saveToFile: boolean
saveInternal: boolean
filePrefix: string
fileSuffix: string
onMapPacket: (data: any) => boolean
}
}
declare module 'mineflayer' {
interface Bot {
mapDownloader: MapDownloader
}
interface BotEvents {
'new_map': ({ name, png, id }) => void
}
interface BotOptions {
"mapDownloader-outputDir"?: string
"mapDownloader-saveToFile"?: boolean
"mapDownloader-saveInternal"?: boolean
"mapDownloader-filePrefix"?: string
"mapDownloader-fileSuffix"?: string
}
}