From 196d133b2d1cd4625cc25e1576de44e0678b8f16 Mon Sep 17 00:00:00 2001 From: U61vashka Date: Wed, 8 Jun 2022 12:15:06 +0600 Subject: [PATCH] Remove unused import, fix enter delay resolving --- .../me/mastercapexd/auth/bungee/BungeeAuthEngine.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/me/mastercapexd/auth/bungee/BungeeAuthEngine.java b/src/main/java/me/mastercapexd/auth/bungee/BungeeAuthEngine.java index 685401d7..671afe57 100644 --- a/src/main/java/me/mastercapexd/auth/bungee/BungeeAuthEngine.java +++ b/src/main/java/me/mastercapexd/auth/bungee/BungeeAuthEngine.java @@ -18,7 +18,6 @@ import me.mastercapexd.auth.config.message.proxy.ProxyMessageContext; import me.mastercapexd.auth.config.server.ConfigurationServer; import me.mastercapexd.auth.link.entryuser.LinkEntryUser; -import me.mastercapexd.auth.link.vk.VKLinkType; import me.mastercapexd.auth.proxy.ProxyPlugin; import me.mastercapexd.auth.proxy.api.bossbar.ProxyBossbar; import me.mastercapexd.auth.proxy.message.ProxyComponent; @@ -80,9 +79,9 @@ private void startMessageTask() { } if (TelegramLinkAuthenticationStep.STEP_NAME .equals(account.getCurrentAuthenticationStep().getStepName())) { - player.sendMessage( - TELEGRAM_MESSAGES.getMessage("enter-confirm-need-chat", new ProxyMessageContext(account)) - .as(BungeeMultiProxyComponent.class).components()); + player.sendMessage(TELEGRAM_MESSAGES + .getMessage("enter-confirm-need-chat", new ProxyMessageContext(account)) + .as(BungeeMultiProxyComponent.class).components()); TitleBar.send(player, TELEGRAM_MESSAGES.getStringMessage("enter-confirm-need-title"), TELEGRAM_MESSAGES.getStringMessage("enter-confirm-need-subtitle"), 0, 120, 0); continue; @@ -144,7 +143,7 @@ private void startAuthTask() { for (LinkEntryUser entryUser : Auth.getLinkEntryAuth() .getLinkUsers(user -> user.getAccount().getId().equals(account.getId()))) if (entryUser != null) - authTime += entryUser.getLinkType().getSettings().getEnterSettings().getEnterDelay() * 1000; + authTime += entryUser.getLinkType().getSettings().getEnterSettings().getEnterDelay(); if (onlineTime >= authTime) { player.disconnect( @@ -162,6 +161,7 @@ private void startAuthTask() { } ProxyBossbar bar = Auth.getBar(id); bar.progress(1.0F - onlineTime / (float) authTime); + bar.update(); } } }, 0L, 1000L, TimeUnit.MILLISECONDS);