fix: player skin when only changing name
This commit is contained in:
parent
262622332a
commit
95453f24d1
4 changed files with 5 additions and 4 deletions
|
@ -93,7 +93,7 @@ public class v1_17_R1 implements Internals {
|
|||
final PacketPlayOutPlayerInfo add = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.a);
|
||||
final GameProfile gameProfile = new GameProfile(player.getUniqueId(), profile.getName());
|
||||
|
||||
if (skinChange) {
|
||||
if (skinChange || !profile.getSkin().equalsIgnoreCase(player.getName())) {
|
||||
try {
|
||||
final Optional<String> uuid = NickoBukkit.getInstance().getMojangAPI().getUUID(profile.getSkin());
|
||||
if (uuid.isPresent()) {
|
||||
|
|
|
@ -95,7 +95,7 @@ public class v1_18_R1 implements Internals {
|
|||
final PacketPlayOutPlayerInfo add = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.a);
|
||||
final GameProfile gameProfile = new GameProfile(player.getUniqueId(), profile.getName());
|
||||
|
||||
if (skinChange) {
|
||||
if (skinChange || !profile.getSkin().equalsIgnoreCase(player.getName())) {
|
||||
try {
|
||||
final Optional<String> uuid = NickoBukkit.getInstance().getMojangAPI().getUUID(profile.getSkin());
|
||||
if (uuid.isPresent()) {
|
||||
|
|
|
@ -95,7 +95,7 @@ public class v1_18_R2 implements Internals {
|
|||
final PacketPlayOutPlayerInfo add = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.a);
|
||||
final GameProfile gameProfile = new GameProfile(player.getUniqueId(), profile.getName());
|
||||
|
||||
if (skinChange) {
|
||||
if (skinChange || !profile.getSkin().equalsIgnoreCase(player.getName())) {
|
||||
try {
|
||||
final Optional<String> uuid = NickoBukkit.getInstance().getMojangAPI().getUUID(profile.getSkin());
|
||||
if (uuid.isPresent()) {
|
||||
|
|
|
@ -99,7 +99,7 @@ public class v1_19_R1 implements Internals {
|
|||
final ProfilePublicKey.a key = remove.b().get(0).e();
|
||||
final GameProfile gameProfile = new GameProfile(player.getUniqueId(), profile.getName());
|
||||
|
||||
if (skinChange) {
|
||||
if (skinChange || !profile.getSkin().equalsIgnoreCase(player.getName())) {
|
||||
try {
|
||||
final Optional<String> uuid = NickoBukkit.getInstance().getMojangAPI().getUUID(profile.getSkin());
|
||||
if (uuid.isPresent()) {
|
||||
|
@ -121,6 +121,7 @@ public class v1_19_R1 implements Internals {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
add.b().clear();
|
||||
add.b().add(new PacketPlayOutPlayerInfo.PlayerInfoData(gameProfile,
|
||||
player.getPing(),
|
||||
|
|
Loading…
Reference in a new issue