Class NamespaceID

java.lang.Object
net.minestom.server.utils.NamespaceID
All Implemented Interfaces:
CharSequence, Comparable<net.kyori.adventure.key.Key>, net.kyori.adventure.key.Key, net.kyori.adventure.key.Keyed, net.kyori.adventure.key.Namespaced, net.kyori.examination.Examinable

public final class NamespaceID extends Object implements CharSequence, net.kyori.adventure.key.Key
Represents a namespaced ID https://minecraft.wiki/w/Namespaced_ID
  • Method Details

    • from

      @NotNull public static @NotNull NamespaceID from(@NotNull @NotNull String namespace)
    • from

      @NotNull public static @NotNull NamespaceID from(@NotNull @NotNull String domain, @NotNull @NotNull String path)
    • from

      @NotNull public static @NotNull NamespaceID from(@NotNull @NotNull net.kyori.adventure.key.Key key)
    • domain

      @NotNull public @NotNull String domain()
    • path

      @NotNull public @NotNull String path()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • length

      public int length()
      Specified by:
      length in interface CharSequence
    • charAt

      public char charAt(int index)
      Specified by:
      charAt in interface CharSequence
    • subSequence

      @NotNull public @NotNull CharSequence subSequence(int start, int end)
      Specified by:
      subSequence in interface CharSequence
    • toString

      @NotNull public @NotNull String toString()
      Specified by:
      toString in interface CharSequence
      Overrides:
      toString in class Object
    • namespace

      @Pattern("[a-z0-9_\\-.]+") @NotNull public @NotNull String namespace()
      Specified by:
      namespace in interface net.kyori.adventure.key.Key
      Specified by:
      namespace in interface net.kyori.adventure.key.Namespaced
    • value

      @NotNull public @NotNull String value()
      Specified by:
      value in interface net.kyori.adventure.key.Key
    • asString

      @NotNull public @NotNull String asString()
      Specified by:
      asString in interface net.kyori.adventure.key.Key