SerenityJS
    Preparing search index...

    Hierarchy

    Index

    Constructors

    Properties

    commandPalette: CommandPalette = ...

    The global commands registry for the server. The commands will register on every world that is created.

    console: ConsoleInterface = ...

    The console command interface for the server

    currentTick: bigint = 0n

    The current tick of the server

    generators: Map<string, typeof TerrainGenerator> = ...

    The registered terrain generators that are available to the server

    logger: Logger = ...

    The logger instance for the server

    network: Network

    The network handler for the server

    The permissions interface for the server.

    players: Map<Connection, Player> = ...

    The players that are currently connected to the server

    properties: SerenityProperties = DefaultSerenityProperties

    The properties that are being used for the server

    providers: Map<typeof WorldProvider, WorldProviderProperties> = ...

    The registered providers and properties that are available to the server

    resourcePacks: ResourcePackManager

    The resource pack manager for the server.

    schedules: Set<TickSchedule> = ...

    The tick schedules that are currently active on the server. These schedules will be executed when the server ticks.

    simulations: Set<Simulation> = ...

    The simulations that are currently active on the server. These simulations will be executed at a higher frequency than the server ticks.

    state: ServerState = ServerState.StartingUp

    The current state of the server, whether it is starting up, running, or shutting down

    ticks: number[] = []

    The ticks that have been recorded by the server

    tps: number = 0

    The current ticks per second of the server

    worlds: Map<string, World> = ...

    The worlds that are currently loaded on the server

    Accessors

    • get maxListeners(): number

      Returns number

    • set maxListeners(value: number): void

      Parameters

      • value: number

      Returns void

    Methods

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns boolean

    • Gets a dimension from a world by its identifier

      Parameters

      • world: World

        The world to get the dimension from

      • identifier: string

        The identifier of the dimension

      Returns null | Dimension

      The dimension, if found; otherwise, null

    • Gets a player by their raknet connection

      Parameters

      • connection: Connection

        The connection to get the player from

      Returns null | Player

      The player, if found; otherwise, null

    • Gets a player by their username

      Parameters

      • username: string

        The username to get the player from

      Returns null | Player

      The player, if found; otherwise, null

    • Gets a player by their uuid

      Parameters

      • uuid: string

        The uuid to get the player from

      Returns null | Player

      The player, if found; otherwise, null

    • Gets a player by their xuid

      Parameters

      • xuid: string

        The xuid to get the player from

      Returns null | Player

      The player, if found; otherwise, null

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      • Optionalevent: K

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      • Optionalevent: K

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      • Optionalevent: K

      Returns this

    • Type Parameters

      • K extends (keyof WorldEventSignals) | (keyof ServerEvents)

      Parameters

      Returns this

    • Parameters

      • path: string

      Returns this

    • Sets the message of the day for the server

      Parameters

      • motd: string

        The message of the day to set

      Returns void

    • Simulates the callback at the specified frequency. This will run at a higher frequency then minecraft ticks.

      Parameters

      • frequency: number

        Simulation frequency in seconds. The server game loop is capped at 100 simulations per second.

      • callback: SimulationCallback

        The callback to run when its time to simulate.

      Returns SimulationInstance

      An object containing some controls for the simulation.

    • Writes the server properties to the specified path

      Parameters

      • path: string

        The path to write the server properties to

      Returns undefined | false

      Whether the properties were successfully written or not