Don't cancel re-allowed connections unless the cancel was made by LP

This commit is contained in:
Luck
2017-06-26 21:39:59 +01:00
Unverified
parent fa0b66c2dc
commit 5cd5186092
3 changed files with 0 additions and 43 deletions
@@ -47,9 +47,6 @@ import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.event.EventPriority;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
@@ -57,8 +54,6 @@ import java.util.concurrent.TimeUnit;
public class BungeeListener implements Listener {
private final LPBungeePlugin plugin;
private final Set<UUID> deniedLogin = Collections.synchronizedSet(new HashSet<>());
@EventHandler(priority = EventPriority.LOW)
public void onPlayerLogin(LoginEvent e) {
/* Called when the player first attempts a connection with the server.
@@ -74,16 +69,6 @@ public class BungeeListener implements Listener {
final PendingConnection c = e.getConnection();
/* another plugin (or the proxy itself) has cancelled this connection already */
if (e.isCancelled()) {
// log that we are not loading any data
deniedLogin.add(c.getUniqueId());
e.completeIntent(plugin);
return;
}
/* there was an issue connecting to the DB, performing file i/o, etc.
as this is bungeecord, we will still allow the login, as players can't really do much harm without permissions data.
the proxy will just fallback to using the config file perms. */
@@ -91,7 +76,6 @@ public class BungeeListener implements Listener {
// log that the user tried to login, but was denied at this stage.
plugin.getLog().warn("Permissions storage is not loaded. No permissions data will be loaded for: " + c.getUniqueId() + " - " + c.getName());
deniedLogin.add(c.getUniqueId());
e.completeIntent(plugin);
return;
@@ -115,7 +99,6 @@ public class BungeeListener implements Listener {
// there was some error loading
plugin.getLog().warn("Error loading data. No permissions data will be loaded for: " + c.getUniqueId() + " - " + c.getName());
deniedLogin.add(c.getUniqueId());
}
// finally, complete our intent to modify state, so the proxy can continue handling the connection.