Fixes #637, can now turn off random UUIDs

This commit is contained in:
libraryaddict 2022-03-11 00:12:40 +13:00
parent 07f4e766c1
commit fe67553bd8
3 changed files with 14 additions and 1 deletions

View File

@ -278,6 +278,9 @@ public class DisguiseConfig {
@Getter
@Setter
private static String data;
@Getter
@Setter
private static boolean randomUUIDS;
public static boolean isArmorstandsName() {
return getPlayerNameType() == PlayerNameType.ARMORSTANDS;
@ -646,6 +649,7 @@ public class DisguiseConfig {
setViewSelfDisguisesDefault(config.getBoolean("ViewSelfDisguisesDefault"));
setContactMojangServers(config.getBoolean("ContactMojangServers"));
setDisguiseRadiusMax(config.getInt("DisguiseRadiusMax"));
setRandomUUIDS(config.getBoolean("RandomUUIDs"));
String apiKey = config.getString("MineSkinAPIKey");
if (apiKey != null && apiKey.matches("[a-zA-Z0-9]{8,}")) {

View File

@ -118,6 +118,10 @@ public abstract class Disguise {
}
public UUID getUUID() {
if (!isPlayerDisguise() && !DisguiseConfig.isRandomUUIDS() && getEntity() != null) {
return getEntity().getUniqueId();
}
// Partial fix for disguises serialized in older versions
if (this.uuid == null) {
this.uuid = ReflectionManager.getRandomUUID();

View File

@ -39,3 +39,8 @@ CarpetableLlama: false
# Can a player interact with a non-saddled horse of any type, to give it a saddle?
# This does not change what you can ride or control!
SaddleableHorse: false
# You shouldn't need to touch this, but if you do; This was added so scoreboard stuff that affects a certain UUID, will still continue to affect that UUID
# This doesn't affect player disguises as those would be severely impacted
# If you are getting issues using this, please do not report them. You disable this at your own risk.
RandomUUIDs: true