mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Fix player entry is not saved if namechangecheck is enabled
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
* 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
|
||||
* Fix player entry is not saved if namechangecheck is enabled
|
||||
|
||||
######1.6.2
|
||||
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerLoginEvent;
|
||||
|
||||
public class LoginSkinApplyListener implements Listener {
|
||||
|
||||
@ -20,8 +20,8 @@ public class LoginSkinApplyListener implements Listener {
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onPlayerLogin(PlayerJoinEvent joinEvent) {
|
||||
Player player = joinEvent.getPlayer();
|
||||
public void onPlayerLogin(PlayerLoginEvent loginEvent) {
|
||||
Player player = loginEvent.getPlayer();
|
||||
|
||||
BukkitLoginSession session = plugin.getSessions().get(player.getAddress().toString());
|
||||
if (session != null && plugin.getConfig().getBoolean("forwardSkin")) {
|
||||
|
@ -63,10 +63,10 @@ public class NameCheckTask implements Runnable {
|
||||
}
|
||||
|
||||
if (premiumUUID != null && plugin.getConfig().getBoolean("nameChangeCheck")) {
|
||||
profile = plugin.getCore().getStorage().loadProfile(premiumUUID);
|
||||
if (profile != null) {
|
||||
PlayerProfile uuidProfile = plugin.getCore().getStorage().loadProfile(premiumUUID);
|
||||
if (uuidProfile != null) {
|
||||
plugin.getLogger().log(Level.FINER, "Player {0} changed it's username", premiumUUID);
|
||||
enablePremiumLogin(profile, false);
|
||||
enablePremiumLogin(uuidProfile, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user