Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ensure NPC userdata creation for Citizen NPCs #4149

Merged
merged 1 commit into from
May 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ public boolean createPlayerAccount(OfflinePlayer player) {
return false;
}

// This is a UUID generated from a seed that is 100% an NPC or offline mode user.
if (player.getUniqueId().version() == 3) {
// String based UUIDs are version 3 and are used for NPC and OfflinePlayers
// Citizens uses v2 UUIDs, yeah I don't know either!
if (player.getUniqueId().version() == 3 || player.getUniqueId().version() == 2) {
final File folder = new File(ess.getDataFolder(), "userdata");
if (!folder.exists()) {
if (!folder.mkdirs()) {
Expand Down