Interface MUUID


@Immutable public sealed interface MUUID
The mindustry identity format. A combination of a UUID and a USID.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Throws an IllegalArgumentException if the given string is not a valid USID.
    static void
    Throws an IllegalArgumentException if the given string is not a valid UUID.
    static MUUID
    from(mindustry.gen.Player player)
    Creates a new MUUID from a Player.
    static MUUID
    from(mindustry.net.Administration.PlayerInfo info)
    Creates a new MUUID from a Administration.PlayerInfo.
    default byte[]
    Returns the USID as decoded bytes.
    default byte[]
    Returns the UUID as decoded bytes.
    Returns the USID.
    Returns the UUID.
    static boolean
    isUsid(String usid)
    Returns whether the given string is a valid USID.
    static boolean
    isUuid(String uuid)
    Returns whether the given string is a valid UUID.
    static MUUID
    of(String uuid, String usid)
    Creates a new MUUID from a UUID and USID.
    default UUID
    Converts the uuid of this muuid into a real UUID, version 8.
  • Method Details

    • of

      static MUUID of(String uuid, String usid)
      Creates a new MUUID from a UUID and USID.
      Parameters:
      uuid - the UUID
      usid - the USID
      Returns:
      the MUUID
    • from

      static MUUID from(mindustry.gen.Player player)
      Creates a new MUUID from a Player.
      Parameters:
      player - the player
      Returns:
      the MUUID
    • from

      static MUUID from(mindustry.net.Administration.PlayerInfo info)
      Creates a new MUUID from a Administration.PlayerInfo.
      Parameters:
      info - the player info
      Returns:
      the MUUID
    • isUuid

      static boolean isUuid(String uuid)
      Returns whether the given string is a valid UUID.
      Parameters:
      uuid - the UUID to check
      Returns:
      true if the given string is a valid UUID, false otherwise
    • checkUuid

      static void checkUuid(String uuid)
      Throws an IllegalArgumentException if the given string is not a valid UUID.
    • isUsid

      static boolean isUsid(String usid)
      Returns whether the given string is a valid USID.
      Parameters:
      usid - the USID to check
      Returns:
      true if the given string is a valid USID, false otherwise
    • checkUsid

      static void checkUsid(String usid)
      Throws an IllegalArgumentException if the given string is not a valid USID.
    • getUuid

      String getUuid()
      Returns the UUID.
    • getDecodedUuid

      default byte[] getDecodedUuid()
      Returns the UUID as decoded bytes.
    • getUsid

      String getUsid()
      Returns the USID.
    • getDecodedUsid

      default byte[] getDecodedUsid()
      Returns the USID as decoded bytes.
    • toRealUUID

      default UUID toRealUUID()
      Converts the uuid of this muuid into a real UUID, version 8.
      See Also: