Fix setName not working correctly in a few cases

This commit is contained in:
libraryaddict 2020-01-28 17:02:30 +13:00
parent b696ea9dcf
commit 4f049ca1fa
No known key found for this signature in database
GPG key ID: 052E4FBCD257AEA4

View file

@ -269,6 +269,11 @@ public class PlayerDisguise extends TargetedDisguise {
if (stopDisguise()) {
playerName = name;
if (gameProfile != null) {
gameProfile = ReflectionManager
.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile());
}
if (!startDisguise()) {
throw new IllegalStateException("Unable to restart disguise");
}
@ -277,6 +282,10 @@ public class PlayerDisguise extends TargetedDisguise {
}
} else {
playerName = name;
if (gameProfile != null) {
gameProfile = ReflectionManager.getGameProfileWithThisSkin(uuid, getProfileName(), getGameProfile());
}
}
// Scare monger for the pirates of a certain site. Don't start messages until 14 days has passed!