Class MUUID
java.lang.Object
com.xpdustry.distributor.common.player.MUUID
The mindustry identity format. A combination of a UUID and a USID.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidThrows anIllegalArgumentExceptionif the given string is not a valid USID.static voidThrows anIllegalArgumentExceptionif the given string is not a valid UUID.booleanbyte[]Returns the USID as decoded bytes.byte[]Returns the UUID as decoded bytes.getUsid()Returns the USID.getUuid()Returns the UUID.inthashCode()static booleanReturns whether the given string is a valid USID.static booleanReturns whether the given string is a valid UUID.static MUUIDCreates a new MUUID from a UUID and USID.static MUUIDof(mindustry.gen.Player player) Creates a new MUUID from aPlayer.static MUUIDof(mindustry.net.Administration.PlayerInfo info) Creates a new MUUID from aAdministration.PlayerInfo.toString()
-
Method Details
-
of
Creates a new MUUID from a UUID and USID.- Parameters:
uuid- the UUIDusid- the USID- Returns:
- the MUUID
-
of
Creates a new MUUID from aPlayer.- Parameters:
player- the player- Returns:
- the MUUID
-
of
Creates a new MUUID from aAdministration.PlayerInfo.- Parameters:
info- the player info- Returns:
- the MUUID
-
isUuid
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
Throws anIllegalArgumentExceptionif the given string is not a valid UUID. -
isUsid
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
Throws anIllegalArgumentExceptionif the given string is not a valid USID. -
getUuid
Returns the UUID. -
getDecodedUuid
public byte[] getDecodedUuid()Returns the UUID as decoded bytes. -
getUsid
Returns the USID. -
getDecodedUsid
public byte[] getDecodedUsid()Returns the USID as decoded bytes. -
hashCode
public int hashCode() -
equals
-
toString
-