Remove on blacklist status on join too

This commit is contained in:
games647
2019-12-29 13:33:18 +01:00
parent 2c7e569653
commit 5a5cf016d9
5 changed files with 12 additions and 7 deletions
@@ -38,6 +38,7 @@ public class ConnectionListener implements Listener {
public void onPlayerJoin(PlayerJoinEvent joinEvent) {
Player player = joinEvent.getPlayer();
removeBlacklistStatus(player);
if (!plugin.isBungeeEnabled()) {
//Wait before auth plugin and we received a message from BungeeCord initializes the player
Runnable forceLoginTask = new ForceLoginTask(plugin.getCore(), player);
@@ -48,9 +49,13 @@ public class ConnectionListener implements Listener {
@EventHandler
public void onPlayerQuit(PlayerQuitEvent quitEvent) {
Player player = quitEvent.getPlayer();
player.removeMetadata(plugin.getName(), plugin);
removeBlacklistStatus(player);
plugin.getCore().getPendingConfirms().remove(player.getUniqueId());
plugin.getPremiumPlayers().remove(player.getUniqueId());
}
private void removeBlacklistStatus(Player player) {
player.removeMetadata(plugin.getName(), plugin);
}
}