Hierarchy

  • Game

Methods

  • Execute an in-game command.

    Parameters

    • cmd: string

      The command to send. Be sure to add '/' before your command.

    Returns void

  • Gets the featured server name you are connected to. This will return null if you are not in a featured server.

    Featured server examples: "The Hive" "CubeCraft" "InPvP" "Mineplex"

    Returns null | string

  • Gets the user's input setting. Usually a key code; for example, "forward" returns KeyCode.W by default.

    If this function returns 0, either the key is set to nothing or the specified name was not found.

    Parameters

    Returns number

  • Gets the port of the server you're connected to. If you are not in a server, it returns 0.

    Returns number

  • Gets the server you are connected to. This will return null if you are not in a server.

    Returns null | string

  • Get whether you are in a UI screen

    Returns boolean

  • Plays a sound. Refer to https://www.digminecraft.com/lists/sound_list_pe.php for sounds

    Parameters

    • soundName: string

      The sound name, for example: mob.enderdragon.growl

    • volume: number

      The volume of the sound. Default is 1

    • pitch: number

      Pitch of the sound. Default is 1

    Returns void

  • Sends a chat message.

    Parameters

    • msg: string

      The message to send.

    Returns void

Generated using TypeDoc