mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2025-07-04 14:36:41 +00:00
Init
This commit is contained in:
26
Commons/src/main/java/me/totalfreedom/utils/Identity.java
Normal file
26
Commons/src/main/java/me/totalfreedom/utils/Identity.java
Normal file
@ -0,0 +1,26 @@
|
||||
package me.totalfreedom.utils;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class Identity
|
||||
{
|
||||
private final String key;
|
||||
|
||||
private final UUID id;
|
||||
|
||||
public Identity(String key)
|
||||
{
|
||||
this.key = key;
|
||||
this.id = UUID.nameUUIDFromBytes(key.getBytes());
|
||||
}
|
||||
|
||||
public String getKey()
|
||||
{
|
||||
return key;
|
||||
}
|
||||
|
||||
public UUID getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user