Skip to content

Instantly share code, notes, and snippets.

@weihao
Forked from games647/OfflineUUID.java
Created February 6, 2023 19:26
Show Gist options
  • Save weihao/5eecd59295da9128c44075c92c14fc0d to your computer and use it in GitHub Desktop.
Save weihao/5eecd59295da9128c44075c92c14fc0d to your computer and use it in GitHub Desktop.
Generate a offline uuid based on the minecraft player name
import com.google.common.base.Charsets;
import java.util.UUID;
public class OfflineUUID {
public static void main(String[] test) throws Exception {
UUID.nameUUIDFromBytes(("OfflinePlayer:" + "playerName").getBytes(Charsets.UTF_8));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment