Skip to content

Commit

Permalink
Remove unused import, fix enter delay resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
bivashy committed Jun 8, 2022
1 parent c7b886f commit 196d133
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/me/mastercapexd/auth/bungee/BungeeAuthEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand All @@ -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);
Expand Down

0 comments on commit 196d133

Please sign in to comment.