diff --git a/CHANGELOG.md b/CHANGELOG.md index b719bbdb..c5cf4a60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * Added support for making requests to Mojang from different IPv4 addresses * Added us.mcapi.com as third-party APIs to workaround rate-limits * Fixed NPE in BungeeCord on cracked session +* Fixed skin applies if premium uuid is deactivated ######1.6.2 diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PlayerConnectionListener.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PlayerConnectionListener.java index 532a1d7d..e83dadd8 100644 --- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PlayerConnectionListener.java +++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PlayerConnectionListener.java @@ -14,8 +14,8 @@ import java.util.logging.Level; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.connection.PendingConnection; import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.event.LoginEvent; import net.md_5.bungee.api.event.PlayerDisconnectEvent; -import net.md_5.bungee.api.event.PostLoginEvent; import net.md_5.bungee.api.event.PreLoginEvent; import net.md_5.bungee.api.event.ServerConnectedEvent; import net.md_5.bungee.api.plugin.Listener; @@ -48,14 +48,16 @@ public class PlayerConnectionListener implements Listener { } @EventHandler - public void onLogin(PostLoginEvent loginEvent) { - ProxiedPlayer player = loginEvent.getPlayer(); - PendingConnection connection = player.getPendingConnection(); + public void onLogin(LoginEvent loginEvent) { + //use the loginevent instead of the postlogin event in order to send the loginsuccess packet to the client + //with the offline uuid this makes it possible to set the skin then + + PendingConnection connection = loginEvent.getConnection(); String username = connection.getName(); if (connection.isOnlineMode()) { LoginSession session = plugin.getSession().get(connection); PlayerProfile playerProfile = session.getProfile(); - playerProfile.setUuid(player.getUniqueId()); + playerProfile.setUuid(connection.getUniqueId()); //bungeecord will do this automatically so override it on disabled option InitialHandler initialHandler = (InitialHandler) connection; diff --git a/core/src/main/resources/config.yml b/core/src/main/resources/config.yml index 364bb047..3f921b47 100644 --- a/core/src/main/resources/config.yml +++ b/core/src/main/resources/config.yml @@ -91,7 +91,6 @@ nameChangeCheck: false # * is the owner of the premium account # * the serverconnection is established through a premium connection (paid account authentification) # * has a skin -# * and you activated premium uuids # # This means this plugin doesn't need to create a new connection to the Mojang servers, because # the skin data is included in the Auth-Verification-Response sent by Mojang. If you want to use for other