Fixes #637, can now turn off random UUIDs
This commit is contained in:
parent
07f4e766c1
commit
fe67553bd8
@ -278,6 +278,9 @@ public class DisguiseConfig {
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
private static String data;
|
private static String data;
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
private static boolean randomUUIDS;
|
||||||
|
|
||||||
public static boolean isArmorstandsName() {
|
public static boolean isArmorstandsName() {
|
||||||
return getPlayerNameType() == PlayerNameType.ARMORSTANDS;
|
return getPlayerNameType() == PlayerNameType.ARMORSTANDS;
|
||||||
@ -646,6 +649,7 @@ public class DisguiseConfig {
|
|||||||
setViewSelfDisguisesDefault(config.getBoolean("ViewSelfDisguisesDefault"));
|
setViewSelfDisguisesDefault(config.getBoolean("ViewSelfDisguisesDefault"));
|
||||||
setContactMojangServers(config.getBoolean("ContactMojangServers"));
|
setContactMojangServers(config.getBoolean("ContactMojangServers"));
|
||||||
setDisguiseRadiusMax(config.getInt("DisguiseRadiusMax"));
|
setDisguiseRadiusMax(config.getInt("DisguiseRadiusMax"));
|
||||||
|
setRandomUUIDS(config.getBoolean("RandomUUIDs"));
|
||||||
String apiKey = config.getString("MineSkinAPIKey");
|
String apiKey = config.getString("MineSkinAPIKey");
|
||||||
|
|
||||||
if (apiKey != null && apiKey.matches("[a-zA-Z0-9]{8,}")) {
|
if (apiKey != null && apiKey.matches("[a-zA-Z0-9]{8,}")) {
|
||||||
|
@ -118,6 +118,10 @@ public abstract class Disguise {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public UUID getUUID() {
|
public UUID getUUID() {
|
||||||
|
if (!isPlayerDisguise() && !DisguiseConfig.isRandomUUIDS() && getEntity() != null) {
|
||||||
|
return getEntity().getUniqueId();
|
||||||
|
}
|
||||||
|
|
||||||
// Partial fix for disguises serialized in older versions
|
// Partial fix for disguises serialized in older versions
|
||||||
if (this.uuid == null) {
|
if (this.uuid == null) {
|
||||||
this.uuid = ReflectionManager.getRandomUUID();
|
this.uuid = ReflectionManager.getRandomUUID();
|
||||||
|
@ -38,4 +38,9 @@ CarpetableLlama: false
|
|||||||
|
|
||||||
# Can a player interact with a non-saddled horse of any type, to give it a saddle?
|
# 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!
|
# This does not change what you can ride or control!
|
||||||
SaddleableHorse: false
|
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
|
Loading…
Reference in New Issue
Block a user