mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-31 19:24:47 +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
|
* Added us.mcapi.com as third-party APIs to workaround rate-limits
|
||||||
* Fixed NPE in BungeeCord on cracked session
|
* Fixed NPE in BungeeCord on cracked session
|
||||||
* Fixed skin applies if premium uuid is deactivated
|
* Fixed skin applies if premium uuid is deactivated
|
||||||
|
* Fix player entry is not saved if namechangecheck is enabled
|
||||||
|
|
||||||
######1.6.2
|
######1.6.2
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerLoginEvent;
|
||||||
|
|
||||||
public class LoginSkinApplyListener implements Listener {
|
public class LoginSkinApplyListener implements Listener {
|
||||||
|
|
||||||
@@ -20,8 +20,8 @@ public class LoginSkinApplyListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW)
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
public void onPlayerLogin(PlayerJoinEvent joinEvent) {
|
public void onPlayerLogin(PlayerLoginEvent loginEvent) {
|
||||||
Player player = joinEvent.getPlayer();
|
Player player = loginEvent.getPlayer();
|
||||||
|
|
||||||
BukkitLoginSession session = plugin.getSessions().get(player.getAddress().toString());
|
BukkitLoginSession session = plugin.getSessions().get(player.getAddress().toString());
|
||||||
if (session != null && plugin.getConfig().getBoolean("forwardSkin")) {
|
if (session != null && plugin.getConfig().getBoolean("forwardSkin")) {
|
||||||
|
@@ -63,10 +63,10 @@ public class NameCheckTask implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (premiumUUID != null && plugin.getConfig().getBoolean("nameChangeCheck")) {
|
if (premiumUUID != null && plugin.getConfig().getBoolean("nameChangeCheck")) {
|
||||||
profile = plugin.getCore().getStorage().loadProfile(premiumUUID);
|
PlayerProfile uuidProfile = plugin.getCore().getStorage().loadProfile(premiumUUID);
|
||||||
if (profile != null) {
|
if (uuidProfile != null) {
|
||||||
plugin.getLogger().log(Level.FINER, "Player {0} changed it's username", premiumUUID);
|
plugin.getLogger().log(Level.FINER, "Player {0} changed it's username", premiumUUID);
|
||||||
enablePremiumLogin(profile, false);
|
enablePremiumLogin(uuidProfile, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user