java.lang.Object
com.xpdustry.distributor.common.player.MUUID

public final class MUUID extends Object
The mindustry identity format. A combination of a UUID and a USID.
  • Method Details

    • of

      public 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
    • of

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

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

      public 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

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

      public 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

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

      public String getUuid()
      Returns the UUID.
    • getDecodedUuid

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

      public String getUsid()
      Returns the USID.
    • getDecodedUsid

      public byte[] getDecodedUsid()
      Returns the USID as decoded bytes.
    • hashCode

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

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object