Package com.velocitypowered.api.util
Class UuidUtils
java.lang.Object
com.velocitypowered.api.util.UuidUtils
Provides a small, useful selection of utilities for working with Minecraft UUIDs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic UUID
fromUndashed
(String string) Converts from an undashed Mojang-style UUID into a JavaUUID
object.static UUID
generateOfflinePlayerUuid
(String username) Generates a UUID for use for offline mode.static String
toUndashed
(UUID uuid) Converts from a JavaUUID
object into an undashed Mojang-style UUID.
-
Method Details
-
fromUndashed
Converts from an undashed Mojang-style UUID into a JavaUUID
object.- Parameters:
string
- the string to convert- Returns:
- the UUID object
-
toUndashed
Converts from a JavaUUID
object into an undashed Mojang-style UUID.- Parameters:
uuid
- the UUID to convert- Returns:
- the undashed UUID
-
generateOfflinePlayerUuid
Generates a UUID for use for offline mode.- Parameters:
username
- the username to use- Returns:
- the offline mode UUID
-