style: tyding up

This commit is contained in:
aro 2023-01-20 23:36:23 +01:00
parent 052ff6bc9d
commit be83496494

View file

@ -86,7 +86,8 @@ public class v1_19_R2 implements Internals {
@Override @Override
public ActionResult updateProfile(Player player, NickoProfile profile, boolean skinChange, boolean reset) { public ActionResult updateProfile(Player player, NickoProfile profile, boolean skinChange, boolean reset) {
final boolean changeOnlyName = profile.getSkin() != null && !profile.getSkin().equalsIgnoreCase(player.getName()); final boolean changeOnlyName = profile.getSkin() != null && !profile.getSkin().equalsIgnoreCase(player.getName());
final String profileName = profile.getName() == null ? player.getName() : profile.getName(); // TODO: 1/20/23 Unable to update the GameProfile name.
//final String profileName = profile.getName() == null ? player.getName() : profile.getName();
Optional<MojangSkin> skin; Optional<MojangSkin> skin;
final ServerPlayer serverPlayer = ((CraftPlayer) player).getHandle(); final ServerPlayer serverPlayer = ((CraftPlayer) player).getHandle();
@ -96,7 +97,6 @@ public class v1_19_R2 implements Internals {
// TODO: 1/20/23 Sets Gamemode to Survival but keeps the flying? Visual effect only? // TODO: 1/20/23 Sets Gamemode to Survival but keeps the flying? Visual effect only?
final ClientboundPlayerInfoUpdatePacket init = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(serverPlayer)); final ClientboundPlayerInfoUpdatePacket init = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(serverPlayer));
if (skinChange || changeOnlyName) { if (skinChange || changeOnlyName) {
try { try {
final MojangAPI mojang = NickoBukkit.getInstance().getMojangAPI(); final MojangAPI mojang = NickoBukkit.getInstance().getMojangAPI();