Ensure NPC userdata creation for Citizen NPCs (#4149)

0ddfcbd0fa/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HumanController.java (L36-L40)

why????????????????????????????????????????????????????????????
This commit is contained in:
Josh Roy 2021-05-13 17:30:37 -04:00 committed by GitHub
parent 8a8d45c91e
commit c76e4239bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,8 +283,9 @@ public class VaultEconomyProvider implements Economy {
return false; return false;
} }
// This is a UUID generated from a seed that is 100% an NPC or offline mode user. // String based UUIDs are version 3 and are used for NPC and OfflinePlayers
if (player.getUniqueId().version() == 3) { // 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"); final File folder = new File(ess.getDataFolder(), "userdata");
if (!folder.exists()) { if (!folder.exists()) {
if (!folder.mkdirs()) { if (!folder.mkdirs()) {