@minecraft/server-gametest
    Preparing search index...

    Function spawnSimulatedPlayer

    • Beta

      Parameters

      • location: DimensionLocation

        The location in which to spawn the player.

      • name: string

        The name for the player.

      • gameMode: GameMode

        The game mode for the player.

      Returns SimulatedPlayer

      Spawns a simulated player that isn't associated to a specific Test. You can use SimulatedPlayer.remove to remove the player from the world.

      This function can't be called in read-only mode.

      This function can throw errors.

      minecraftcommon.EngineError