Clean up using IDE inspections

This commit is contained in:
games647 committed 2017-09-21 15:00:39 +02:00
1 parent 5bf9b05d30
commit 109508dae6
21 files changed
+164 -313

No files matched your search

@@ -1,7 +1,7 @@
package com.github.games647.fastlogin.bungee;
import com.github.games647.fastlogin.bungee.hooks.BungeeAuthHook;
import com.github.games647.fastlogin.bungee.listener.PlayerConnectionListener;
import com.github.games647.fastlogin.bungee.listener.ConnectionListener;
import com.github.games647.fastlogin.bungee.listener.PluginMessageListener;
import com.github.games647.fastlogin.core.shared.FastLoginCore;
import com.github.games647.fastlogin.core.shared.MojangApiConnector;
@@ -46,7 +46,7 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin<CommandSen
}
//events
getProxy().getPluginManager().registerListener(this, new PlayerConnectionListener(this));
getProxy().getPluginManager().registerListener(this, new ConnectionListener(this));
getProxy().getPluginManager().registerListener(this, new PluginMessageListener(this));
//this is required to listen to messages from the server
@@ -4,7 +4,7 @@ import com.github.games647.fastlogin.core.shared.LoginSession;
import com.github.games647.fastlogin.core.shared.MojangApiConnector;
import java.net.InetSocketAddress;
import java.util.List;
import java.util.Collection;
import java.util.Map;
import java.util.logging.Logger;
@@ -12,7 +12,8 @@ import net.md_5.bungee.BungeeCord;
public class MojangApiBungee extends MojangApiConnector {
public MojangApiBungee(Logger logger, List<String> localAddresses, int rateLimit, Map<String, Integer> proxies) {
public MojangApiBungee(Logger logger, Collection<String> localAddresses, int rateLimit
, Map<String, Integer> proxies) {
super(logger, localAddresses, rateLimit, proxies);
}
@@ -21,11 +21,8 @@ public class BungeeAuthHook implements AuthPlugin<ProxiedPlayer> {
@Override
public boolean forceLogin(ProxiedPlayer player) {
String playerName = player.getName();
if (Main.plonline.contains(playerName)) {
return true;
}
return Main.plonline.contains(playerName) || requestHandler.forceLogin(playerName);
return requestHandler.forceLogin(playerName);
}
@Override
@@ -31,11 +31,11 @@ import net.md_5.bungee.event.EventPriority;
* plugin message to the Bukkit version of this plugin in
* order to clear that the connection is online mode.
*/
public class PlayerConnectionListener implements Listener {
public class ConnectionListener implements Listener {
private final FastLoginBungee plugin;
public PlayerConnectionListener(FastLoginBungee plugin) {
public ConnectionListener(FastLoginBungee plugin) {
this.plugin = plugin;
}
@@ -54,11 +54,8 @@ public class ForceLoginTask extends ForceLoginManagement<ProxiedPlayer, CommandS
@Override
public boolean forceRegister(ProxiedPlayer player) {
if (session.isAlreadyLogged()) {
return true;
}
return session.isAlreadyLogged() || super.forceRegister(player);
return super.forceRegister(player);
}
@Override