forked from TuxCoding/FastLogin
Make ignore states more verbose in Velocity
This commit is contained in:
@ -62,7 +62,7 @@ public abstract class ForceLoginManagement<P extends C, C, L extends LoginSessio
|
||||
//premium player
|
||||
AuthPlugin<P> authPlugin = core.getAuthPluginHook();
|
||||
if (authPlugin == null) {
|
||||
//maybe only bungeecord plugin
|
||||
// maybe only bungeecord plugin
|
||||
onForceActionSuccess(session);
|
||||
} else {
|
||||
boolean success = true;
|
||||
|
@ -150,6 +150,7 @@ public class ConnectListener {
|
||||
if (floodgateService != null) {
|
||||
FloodgatePlayer floodgatePlayer = floodgateService.getBedrockPlayer(player.getUniqueId());
|
||||
if (floodgatePlayer != null) {
|
||||
plugin.getLog().info("Running floodgate handling for {}", player);
|
||||
Runnable floodgateAuthTask = new FloodgateAuthTask(plugin.getCore(), player, floodgatePlayer, server);
|
||||
plugin.getScheduler().runAsync(floodgateAuthTask);
|
||||
return;
|
||||
@ -158,6 +159,7 @@ public class ConnectListener {
|
||||
|
||||
VelocityLoginSession session = plugin.getSession().get(player.getRemoteAddress());
|
||||
if (session == null) {
|
||||
plugin.getLog().info("No active login session found on server connect for {}", player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,7 @@ public class ForceLoginTask
|
||||
@Override
|
||||
public void run() {
|
||||
if (session == null) {
|
||||
core.getPlugin().getLog().info("No active login session on force handling for {}", player);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -80,6 +81,7 @@ public class ForceLoginTask
|
||||
@Override
|
||||
public boolean forceLogin(Player player) {
|
||||
if (session.isAlreadyLogged()) {
|
||||
core.getPlugin().getLog().info("Ignoring second force login attempt for {}", player);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -92,11 +94,11 @@ public class ForceLoginTask
|
||||
VelocityFastLoginAutoLoginEvent event = new VelocityFastLoginAutoLoginEvent(session, profile);
|
||||
try {
|
||||
return core.getPlugin().getProxy().getEventManager().fire(event).get();
|
||||
} catch (InterruptedException e) {
|
||||
} catch (InterruptedException interruptedEx) {
|
||||
Thread.currentThread().interrupt(); // Set the interrupt flag again
|
||||
return event;
|
||||
} catch (ExecutionException e) {
|
||||
core.getPlugin().getLog().error("Error firing event", e);
|
||||
} catch (ExecutionException executionEx) {
|
||||
core.getPlugin().getLog().error("Error firing event", executionEx);
|
||||
return event;
|
||||
}
|
||||
}
|
||||
@ -114,6 +116,8 @@ public class ForceLoginTask
|
||||
type = Type.REGISTER;
|
||||
}
|
||||
|
||||
core.getPlugin().getLog().info("Sending force {} for {} towards server {}", type, player.getUsername(), server);
|
||||
|
||||
UUID proxyId = core.getPlugin().getProxyId();
|
||||
ChannelMessage loginMessage = new LoginActionMessage(type, player.getUsername(), proxyId);
|
||||
core.getPlugin().sendPluginMessage(server, loginMessage);
|
||||
|
Reference in New Issue
Block a user