Script API - v1.19.70
    Preparing search index...

    A class that provides system-level events and functions.

    Index

    Constructors

    Properties

    currentTick: number

    Represents the current world tick of the server.

    events: SystemEvents

    Contains a set of events that are applicable for the lifecycle of items in the Minecraft system.

    Methods

    • Beta

      Parameters

      • runId: number

      Returns void

      Cancels the execution of a function run that was previously scheduled via the run function.

    • Parameters

      • callback: () => void

        Function callback to run when the tickDelay time criteria is met.

      Returns number

      An opaque identifier that can be used with the clearRun function to cancel the execution of this run.

      Runs a specified function at a future time. This is frequently used to implement delayed behaviors and game loops.

    • Beta

      Parameters

      • callback: () => void

        Functional code that will run when this interval occurs.

      • OptionaltickInterval: number

        An interval of every N ticks that the callback will be called upon.

      Returns number

      An opaque handle that can be used with the clearRun method to stop the run of this function on an interval.

      Runs a set of code on an interval.

    • Beta

      Parameters

      • callback: () => void

        Functional code that will run when this timeout occurs.

      • OptionaltickDelay: number

        Amount of time, in ticks, before the interval will be called.

      Returns number

      An opaque handle that can be used with the clearRun method to stop the run of this function on an interval.

      Runs a set of code at a future time specified by tickDelay.