@minecraft
    Preparing search index...

    Class WorldClockBeta

    A class that represents a particular clock within a world.

    Index

    Properties

    isPaused: boolean

    Retrieves or sets whether the world clock is currently paused.

    name: string

    The identifier that represents this world clock.

    time: number

    Retrieves or sets the current time (in ticks) of the world clock.

    Minimum Value: 0

    timeMarkers: TimeMarker[]

    Retrieves the current time markers of the world clock.

    Methods

    • World mutation

      Parameters

      • timeMarker: string | TimeMarker

        The time marker or time marker name to rewind the world clock's time to.

      Returns void

      Rewinds the world clock's time to the previous occurrence of the specified time marker.

      WorldClockTimeMarkerNotFoundError: If the time marker does not exist on the world clock. WorldClockRewindError: If the world clock's current time is before the time marker's first occurrence.

      WorldClockRewindError

      WorldClockTimeMarkerNotFoundError

    • World mutation

      Parameters

      • timeMarker: string | TimeMarker

        The time marker or time marker name to set the world clock's time to.

      Returns void

      Sets the world clock's time to the specified time marker.

      WorldClockTimeMarkerNotFoundError: If the time marker does not exist on the world clock.

      WorldClockTimeMarkerNotFoundError

    • World mutation

      Parameters

      • timeMarker: string | TimeMarker

        The time marker or time marker name to skip the world clock's time to.

      Returns void

      Skips the world clock's time to the next occurrence of the specified time marker. If the next occurrence overflows the world clock's time, the time is reset to the first occurrence.

      WorldClockTimeMarkerNotFoundError: If the time marker does not exist on the world clock.

      WorldClockTimeMarkerNotFoundError