Methods
close
- close(): void
-
Returns void
joinProxyClient
-
joinProxyClient(proxyClient: ProxyClient): void
-
Returns void
on
- on(event:
"join" | "leave" |
"connect", callback: ((client:
Client) =>
void)): void
-
Parameters
-
event: "join" | "leave" | "connect"
-
callback: ((client: Client)
=> void)
-
- (client: Client): void
-
Returns void
Returns void
- on(event:
"error", callback: ((customError:
CustomError) => void)): void
-
Parameters
-
event: "error"
-
callback: ((customError: CustomError)
=> void)
Returns void
once
- once(event:
"join" | "leave" |
"connect", callback: ((client:
Client) =>
void)): void
-
Parameters
-
event: "join" | "leave" | "connect"
-
callback: ((client: Client)
=> void)
-
- (client: Client): void
-
Returns void
Returns void
- once(event:
"error", callback: ((customError:
CustomError) => void)): void
-
Parameters
-
event: "error"
-
callback: ((customError: CustomError)
=> void)
Returns void
Constructors
constructor
- new Server(serverOptions:
{
defaultClientProperties?(client:
Client): defaultClientProperties;
serverList?(info:
{
connection:
{
host: null | string;
port: null | number;
};
ip: string;
legacy: boolean;
version: null | version;
}): {
description?: string | Text;
favicon?: Buffer;
players?: {
hover?: string |
{
name:
string;
uuid:
string;
}[];
max?: number;
online?:
number;
};
version?: {
correct?: version;
wrongText?:
string |
Text;
};
};
wrongVersionConnect?(info:
{
connection:
{
host: null | string;
port: null | number;
};
ip: string;
legacy: boolean;
version: newVersion |
"legacy";
}): null | string | Text;
}): Server
-
Parameters
-
serverOptions: {
defaultClientProperties?(client: Client): defaultClientProperties;
serverList?(info: {
connection: {
host: null | string;
port: null | number;
};
ip: string;
legacy:
boolean;
version: null | version;
}): {
description?: string | Text;
favicon?: Buffer;
players?: {
hover?: string | {
name: string;
uuid: string;
}[];
max?: number;
online?: number;
};
version?: {
correct?: version;
wrongText?: string | Text;
};
};
wrongVersionConnect?(info: {
connection: {
host: null | string;
port: null | number;
};
ip: string;
legacy:
boolean;
version: newVersion | "legacy";
}): null | string | Text;
}
-
defaultClientProperties?:function
-
serverList?:function
- serverList(info: {
connection: {
host: null | string;
port: null | number;
};
ip: string;
legacy: boolean;
version: null | version;
}): {
description?: string | Text;
favicon?: Buffer;
players?: {
hover?: string | {
name: string;
uuid: string;
}[];
max?: number;
online?: number;
};
version?: {
correct?: version;
wrongText?: string | Text;
};
}
-
Parameters
-
info: {
connection: {
host: null | string;
port: null | number;
};
ip: string;
legacy: boolean;
version: null | version;
}
-
connection:
{
host:
null |
string;
port:
null |
number;
}
-
host:
null
| string
-
port:
null
| number
-
ip:
string
-
legacy:
boolean
-
version:
null |
version
Returns {
description?: string | Text;
favicon?: Buffer;
players?: {
hover?: string | {
name: string;
uuid: string;
}[];
max?: number;
online?: number;
};
version?: {
correct?: version;
wrongText?: string | Text;
};
}
-
Optional
description?:
string | Text
-
Optional
favicon?:
Buffer
-
Optional
players?:
{
hover?: string | {
name: string;
uuid: string;
}[];
max?: number;
online?: number;
}
-
Optional
hover?:
string |
{
name:
string;
uuid:
string;
}[]
-
Optional
max?:
number
-
Optional
online?:
number
-
Optional
version?:
{
correct?: version;
wrongText?: string | Text;
}
-
Optional
correct?:
version
-
Optional
wrongText?:
string |
Text
-
wrongVersionConnect?:function
-
wrongVersionConnect(info: {
connection: {
host: null | string;
port: null | number;
};
ip: string;
legacy: boolean;
version: newVersion | "legacy";
}): null | string | Text
-
Parameters
-
info: {
connection: {
host: null | string;
port: null | number;
};
ip: string;
legacy: boolean;
version: newVersion | "legacy";
}
-
connection:
{
host:
null |
string;
port:
null |
number;
}
-
host:
null
| string
-
port:
null
| number
-
ip:
string
-
legacy:
boolean
-
Returns null | string | Text