Interface TimeMarker

All Superinterfaces:
Keyed, Registerable<TimeMarker>, Wrapper

@NullMarked @AsOf("3.2.0") public interface TimeMarker extends Wrapper, Keyed, Registerable<TimeMarker>
Represents a time marker in a world clock.
Since:
3.2.0
  • Field Details

  • Method Details

    • key

      @AsOf("3.2.0") ResourceKey key()
      The key of this time marker.
      Specified by:
      key in interface Keyed
      Returns:
      the world clock key
      Since:
      3.2.0
    • ticks

      @AsOf("3.2.0") int ticks()
      The number of ticks this time marker represents.
      Returns:
      the number of ticks this time marker represents
      Since:
      3.2.0
    • showInCommands

      @AsOf("3.2.0") boolean showInCommands()
      Whether this time marker should be shown in the /time command.
      Returns:
      whether this time marker should be shown in the /time command
      Since:
      3.2.0
    • toBuilder

      @AsOf("3.3.0") default TimeMarker.Builder toBuilder()
      Creates a new builder with the same values as this time marker.
      Returns:
      a new builder with the same values
      Since:
      3.3.0
    • of

      @AsOf("3.2.0") static TimeMarker of(ResourceKey key, int ticks)
      Creates a new time marker with the given key and ticks.
      Parameters:
      key - the key of the time marker
      ticks - the number of ticks the time marker represents
      Returns:
      a new time marker with the given key and ticks
      Since:
      3.2.0
    • of

      @AsOf("3.2.0") static TimeMarker of(ResourceKey key, int ticks, boolean showInCommands)
      Creates a new time marker with the given key, ticks, and showInCommands.
      Parameters:
      key - the key of the time marker
      ticks - the number of ticks the time marker represents
      showInCommands - whether the time marker should be shown in the /time command
      Returns:
      a new time marker with the given key, ticks, and showInCommands
      Since:
      3.2.0