Class UuidUtils


  • public final class UuidUtils
    extends java.lang.Object
    Provides a small, useful selection of utilities for working with Minecraft UUIDs.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.UUID fromUndashed​(java.lang.String string)
      Converts from an undashed Mojang-style UUID into a Java UUID object.
      static java.util.UUID generateOfflinePlayerUuid​(java.lang.String username)
      Generates a UUID for use for offline mode.
      static java.lang.String toUndashed​(java.util.UUID uuid)
      Converts from a Java UUID object into an undashed Mojang-style UUID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • fromUndashed

        public static java.util.UUID fromUndashed​(java.lang.String string)
        Converts from an undashed Mojang-style UUID into a Java UUID object.
        Parameters:
        string - the string to convert
        Returns:
        the UUID object
      • toUndashed

        public static java.lang.String toUndashed​(java.util.UUID uuid)
        Converts from a Java UUID object into an undashed Mojang-style UUID.
        Parameters:
        uuid - the UUID to convert
        Returns:
        the undashed UUID
      • generateOfflinePlayerUuid

        public static java.util.UUID generateOfflinePlayerUuid​(java.lang.String username)
        Generates a UUID for use for offline mode.
        Parameters:
        username - the username to use
        Returns:
        the offline mode UUID