Skip to content

Commit a65a5f3

Browse files
author
games647
committed
Make ignore states more verbose in Velocity
1 parent 8a729e0 commit a65a5f3

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

core/src/main/java/com/github/games647/fastlogin/core/shared/ForceLoginManagement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void run() {
6262
//premium player
6363
AuthPlugin<P> authPlugin = core.getAuthPluginHook();
6464
if (authPlugin == null) {
65-
//maybe only bungeecord plugin
65+
// maybe only bungeecord plugin
6666
onForceActionSuccess(session);
6767
} else {
6868
boolean success = true;

velocity/src/main/java/com/github/games647/fastlogin/velocity/listener/ConnectListener.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public void onServerConnected(ServerConnectedEvent serverConnectedEvent) {
150150
if (floodgateService != null) {
151151
FloodgatePlayer floodgatePlayer = floodgateService.getBedrockPlayer(player.getUniqueId());
152152
if (floodgatePlayer != null) {
153+
plugin.getLog().info("Running floodgate handling for {}", player);
153154
Runnable floodgateAuthTask = new FloodgateAuthTask(plugin.getCore(), player, floodgatePlayer, server);
154155
plugin.getScheduler().runAsync(floodgateAuthTask);
155156
return;
@@ -158,6 +159,7 @@ public void onServerConnected(ServerConnectedEvent serverConnectedEvent) {
158159

159160
VelocityLoginSession session = plugin.getSession().get(player.getRemoteAddress());
160161
if (session == null) {
162+
plugin.getLog().info("No active login session found on server connect for {}", player);
161163
return;
162164
}
163165

velocity/src/main/java/com/github/games647/fastlogin/velocity/task/ForceLoginTask.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public ForceLoginTask(FastLoginCore<Player, CommandSource, FastLoginVelocity> co
6868
@Override
6969
public void run() {
7070
if (session == null) {
71+
core.getPlugin().getLog().info("No active login session on force handling for {}", player);
7172
return;
7273
}
7374

@@ -80,6 +81,7 @@ public void run() {
8081
@Override
8182
public boolean forceLogin(Player player) {
8283
if (session.isAlreadyLogged()) {
84+
core.getPlugin().getLog().info("Ignoring second force login attempt for {}", player);
8385
return true;
8486
}
8587

@@ -92,11 +94,11 @@ public FastLoginAutoLoginEvent callFastLoginAutoLoginEvent(LoginSession session,
9294
VelocityFastLoginAutoLoginEvent event = new VelocityFastLoginAutoLoginEvent(session, profile);
9395
try {
9496
return core.getPlugin().getProxy().getEventManager().fire(event).get();
95-
} catch (InterruptedException e) {
97+
} catch (InterruptedException interruptedEx) {
9698
Thread.currentThread().interrupt(); // Set the interrupt flag again
9799
return event;
98-
} catch (ExecutionException e) {
99-
core.getPlugin().getLog().error("Error firing event", e);
100+
} catch (ExecutionException executionEx) {
101+
core.getPlugin().getLog().error("Error firing event", executionEx);
100102
return event;
101103
}
102104
}
@@ -114,6 +116,8 @@ public void onForceActionSuccess(LoginSession session) {
114116
type = Type.REGISTER;
115117
}
116118

119+
core.getPlugin().getLog().info("Sending force {} for {} towards server {}", type, player.getUsername(), server);
120+
117121
UUID proxyId = core.getPlugin().getProxyId();
118122
ChannelMessage loginMessage = new LoginActionMessage(type, player.getUsername(), proxyId);
119123
core.getPlugin().sendPluginMessage(server, loginMessage);

0 commit comments

Comments
 (0)