Fix setName not working correctly in a few cases

This commit is contained in:
libraryaddict 2020-01-28 17:02:30 +13:00
parent 3a2e7602fb
commit accbba2d32
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!