Class Server

Hierarchy

  • Server

Properties

Methods

Constructors

Properties

clients: Client[]

Methods

  • Returns Promise<void>

  • Parameters

    • event: "join" | "leave" | "connect"
    • callback: ((client: Client) => void)
        • (client: Client): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    Returns void

  • Parameters

    • event: "join" | "leave" | "connect"
    • callback: ((client: Client) => void)
        • (client: Client): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    Returns void

Constructors

  • Parameters

    • serverOptions: {
          defaultClientProperties?(client: Client): defaultClientProperties;
          serverList?(info: {
              connection: {
                  host: null | string;
                  port: null | number;
              };
              ip: string;
              legacy: boolean;
              version: null | version;
          }): {
              description?: Text | textInput;
              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
        • 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?: Text | textInput;
              favicon?: Buffer;
              players?: {
                  hover?: string | {
                      name: string;
                      uuid: string;
                  }[];
                  max?: number;
                  online?: number;
              };
              version?: {
                  correct?: version;
                  wrongText?: string | Text;
              };
          }

          • Optional description?: Text | textInput
          • 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
        • 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
            • version: newVersion | "legacy"

          Returns null | string | Text

    Returns Server