mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Added helper method for checking offline UUID's.
This commit is contained in:
parent
bd6c5d0987
commit
ffc54bebaf
@ -93,4 +93,13 @@ public class UUIDFetcher implements Callable<Map<String, UUID>> { //unimplemente
|
|||||||
public static UUID getUUIDOf(String name) throws Exception {
|
public static UUID getUUIDOf(String name) throws Exception {
|
||||||
return new UUIDFetcher(Arrays.asList(name)).call().get(name);
|
return new UUIDFetcher(Arrays.asList(name)).call().get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the passed UUID is a v3 UUID. Offline UUIDs are v3, online are v4.
|
||||||
|
* @param uuid the UUID to check
|
||||||
|
* @return whether the UUID is a v3 UUID & thus is offline
|
||||||
|
*/
|
||||||
|
public static boolean uuidIsOffline(UUID uuid) {
|
||||||
|
return uuid.version() == 3;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user