Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
7db748bbe1
@ -228,6 +228,10 @@
|
||||
<zipfileset src="../Libraries/commons-io-2.4.jar" />
|
||||
<zipfileset src="../Libraries/jedis-2.4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-pool2-2.2.jar" />
|
||||
<zipfileset src="../Libraries/jooq-3.4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpclient-4.2.jar" />
|
||||
<zipfileset src="../Libraries/httpcore-4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/Mineplexer.jar" todir="../../Testing/Proxy/plugins"/>
|
||||
</target>
|
||||
|
@ -6,5 +6,7 @@
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-codec-1.6.jar"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-io-2.4.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.ServerData"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpclient-4.2.jar"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpcore-4.2.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package mineplex.bungee;
|
||||
|
||||
import mineplex.bungee.account.AccountManager;
|
||||
import mineplex.bungee.lobbyBalancer.LobbyBalancer;
|
||||
import mineplex.bungee.motd.MotdManager;
|
||||
import mineplex.bungee.playerCount.PlayerCount;
|
||||
@ -15,10 +16,11 @@ public class Mineplexer extends Plugin
|
||||
{
|
||||
new MotdManager(this);
|
||||
new LobbyBalancer(this);
|
||||
new PlayerCount(this);
|
||||
PlayerCount playerCount = new PlayerCount(this);
|
||||
new FileUpdater(this);
|
||||
new PlayerStats(this);
|
||||
new InternetStatus(this);
|
||||
new PlayerTracker(this);
|
||||
new AccountManager(this, playerCount);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import mineplex.bungee.playerCount.PlayerCount;
|
||||
import net.md_5.bungee.api.event.LoginEvent;
|
||||
import net.md_5.bungee.api.plugin.Listener;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
|
||||
public class AccountManager implements Listener, Runnable
|
||||
{
|
||||
private Plugin _plugin;
|
||||
private PlayerCount _playerCount;
|
||||
private int _playerCap = -1;
|
||||
private AccountManagerRepository _repository;
|
||||
|
||||
private Gson _gson = new Gson();
|
||||
|
||||
public AccountManager(Plugin plugin, PlayerCount playerCount)
|
||||
{
|
||||
_plugin = plugin;
|
||||
_playerCount = playerCount;
|
||||
|
||||
_plugin.getProxy().getPluginManager().registerListener(_plugin, this);
|
||||
_plugin.getProxy().getScheduler().schedule(_plugin, this, 10L, 10L, TimeUnit.SECONDS);
|
||||
|
||||
_repository = new AccountManagerRepository();
|
||||
_repository.initialize();
|
||||
_playerCap = _repository.retrievePlayerCap();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void login(LoginEvent event)
|
||||
{
|
||||
if (_playerCap == -1 || _playerCount.getTotalPlayers() <= _playerCap)
|
||||
return;
|
||||
|
||||
String response = getClient(event.getConnection().getName(), event.getConnection().getUniqueId(), event.getConnection().getAddress().toString());
|
||||
|
||||
ClientToken token = _gson.fromJson(response, ClientToken.class);
|
||||
|
||||
if (token.Rank.equalsIgnoreCase("ALL"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
event.setCancelReason("§fDue to server issues, we have added a §cplayer limit§f.\n"
|
||||
+ "§fWe hope to have this resolved soon, §nplease be ptient§r.\n"
|
||||
+ "§fPlayers with Ranks can still join the server!\n\n"
|
||||
+ "§fPurchase Ranks at §awww.mineplex.com/shop");
|
||||
}
|
||||
}
|
||||
|
||||
public String getClient(String name, UUID uuid, String ipAddress)
|
||||
{
|
||||
LoginToken token = new LoginToken();
|
||||
token.Name = name;
|
||||
token.Uuid = uuid.toString();
|
||||
token.IpAddress = ipAddress;
|
||||
|
||||
return new JsonWebCall("http://accounts.mineplex.com/PlayerAccount/Login").ExecuteReturnStream(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
_playerCap = _repository.retrievePlayerCap();
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class AccountManagerRepository
|
||||
{
|
||||
private Connection _connection = null;
|
||||
private String _connectionString = "jdbc:mysql://db.mineplex.com:3306/BungeeServers?autoReconnect=true&failOverReadOnly=false&maxReconnects=10";
|
||||
private String _userName = "root";
|
||||
private String _password = "tAbechAk3wR7tuTh";
|
||||
|
||||
private static String CREATE_TABLE = "CREATE TABLE IF NOT EXISTS playerCap (id INT NOT NULL AUTO_INCREMENT, playerCap INT, PRIMARY KEY (id));";
|
||||
private static String RETRIEVE_PLAYERCAP = "SELECT playerCap FROM playerCap;";
|
||||
|
||||
public void initialize()
|
||||
{
|
||||
PreparedStatement preparedStatement = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (_connection == null || _connection.isClosed())
|
||||
_connection = DriverManager.getConnection(_connectionString, _userName, _password);
|
||||
|
||||
// Create table
|
||||
preparedStatement = _connection.prepareStatement(CREATE_TABLE);
|
||||
preparedStatement.execute();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
exception.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (preparedStatement != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
preparedStatement.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("Initialized AccountManager.");
|
||||
}
|
||||
|
||||
public int retrievePlayerCap()
|
||||
{
|
||||
ResultSet resultSet = null;
|
||||
PreparedStatement preparedStatement = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (_connection == null || _connection.isClosed())
|
||||
_connection = DriverManager.getConnection(_connectionString, _userName, _password);
|
||||
|
||||
preparedStatement = _connection.prepareStatement(RETRIEVE_PLAYERCAP);
|
||||
resultSet = preparedStatement.executeQuery();
|
||||
|
||||
while (resultSet.next())
|
||||
{
|
||||
return resultSet.getInt(1);
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
exception.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (preparedStatement != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
preparedStatement.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (resultSet != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
resultSet.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class AccountToken
|
||||
{
|
||||
public int AccountId;
|
||||
public String Name;
|
||||
public RankToken Rank;
|
||||
|
||||
public int LoginCount;
|
||||
public long LastLogin;
|
||||
public long TotalPlayingTime;
|
||||
public HashSet<String> IpAdddresses = new HashSet<String>();
|
||||
|
||||
public boolean Banned;
|
||||
public String Reason;
|
||||
|
||||
public int BlueGems;
|
||||
public int GreenGems;
|
||||
public List<Integer> SalesPackageIds;
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
public interface Callback<T>
|
||||
{
|
||||
public void run(T data);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
public class ClientToken
|
||||
{
|
||||
public int AccountId;
|
||||
public String Name;
|
||||
public String Rank;
|
||||
public boolean RankPerm;
|
||||
public String RankExpire;
|
||||
public int EconomyBalance;
|
||||
|
||||
public AccountToken AccountToken;
|
||||
public long LastLogin;
|
||||
}
|
@ -0,0 +1,355 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.conn.scheme.PlainSocketFactory;
|
||||
import org.apache.http.conn.scheme.Scheme;
|
||||
import org.apache.http.conn.scheme.SchemeRegistry;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.impl.conn.PoolingClientConnectionManager;
|
||||
import org.apache.http.message.BasicHeader;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
public class JsonWebCall
|
||||
{
|
||||
private String _url;
|
||||
private PoolingClientConnectionManager _connectionManager;
|
||||
|
||||
public JsonWebCall(String url)
|
||||
{
|
||||
_url = url;
|
||||
|
||||
SchemeRegistry schemeRegistry = new SchemeRegistry();
|
||||
schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
|
||||
|
||||
_connectionManager = new PoolingClientConnectionManager(schemeRegistry);
|
||||
_connectionManager.setMaxTotal(200);
|
||||
_connectionManager.setDefaultMaxPerRoute(20);
|
||||
}
|
||||
|
||||
public String ExecuteReturnStream(Object argument)
|
||||
{
|
||||
HttpClient httpClient = new DefaultHttpClient(_connectionManager);
|
||||
InputStream in = null;
|
||||
String result = null;
|
||||
|
||||
try
|
||||
{
|
||||
HttpResponse response;
|
||||
|
||||
Gson gson = new Gson();
|
||||
HttpPost request = new HttpPost(_url);
|
||||
|
||||
if (argument != null)
|
||||
{
|
||||
StringEntity params = new StringEntity(gson.toJson(argument));
|
||||
params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
|
||||
request.setEntity(params);
|
||||
}
|
||||
|
||||
response = httpClient.execute(request);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
in = response.getEntity().getContent();
|
||||
result = convertStreamToString(in);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.out.println("Error executing JsonWebCall: \n" + ex.getMessage());
|
||||
System.out.println("Result: \n" + result);
|
||||
|
||||
for (StackTraceElement trace : ex.getStackTrace())
|
||||
{
|
||||
System.out.println(trace);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
httpClient.getConnectionManager().shutdown();
|
||||
|
||||
if (in != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
in.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
Execute((Object)null);
|
||||
}
|
||||
|
||||
public void Execute(Object argument)
|
||||
{
|
||||
HttpClient httpClient = new DefaultHttpClient(_connectionManager);
|
||||
InputStream in = null;
|
||||
|
||||
try
|
||||
{
|
||||
Gson gson = new Gson();
|
||||
HttpPost request = new HttpPost(_url);
|
||||
|
||||
if (argument != null)
|
||||
{
|
||||
StringEntity params = new StringEntity(gson.toJson(argument));
|
||||
params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
|
||||
request.setEntity(params);
|
||||
}
|
||||
|
||||
httpClient.execute(request);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.out.println("JsonWebCall.Execute() Error:\n" + ex.getMessage());
|
||||
|
||||
for (StackTraceElement trace : ex.getStackTrace())
|
||||
{
|
||||
System.out.println(trace);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
httpClient.getConnectionManager().shutdown();
|
||||
|
||||
if (in != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
in.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T Execute(Class<T> returnClass)
|
||||
{
|
||||
return Execute(returnClass, (Object)null);
|
||||
}
|
||||
|
||||
public <T> T Execute(Type returnType, Object argument)
|
||||
{
|
||||
HttpClient httpClient = new DefaultHttpClient(_connectionManager);
|
||||
InputStream in = null;
|
||||
T returnData = null;
|
||||
String result = null;
|
||||
|
||||
try
|
||||
{
|
||||
HttpResponse response;
|
||||
|
||||
Gson gson = new Gson();
|
||||
HttpPost request = new HttpPost(_url);
|
||||
|
||||
if (argument != null)
|
||||
{
|
||||
StringEntity params = new StringEntity(gson.toJson(argument));
|
||||
params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
|
||||
request.setEntity(params);
|
||||
}
|
||||
|
||||
response = httpClient.execute(request);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
in = response.getEntity().getContent();
|
||||
|
||||
result = convertStreamToString(in);
|
||||
returnData = new Gson().fromJson(result, returnType);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.out.println("Error executing JsonWebCall: \n" + ex.getMessage());
|
||||
System.out.println("Result: \n" + result);
|
||||
|
||||
for (StackTraceElement trace : ex.getStackTrace())
|
||||
{
|
||||
System.out.println(trace);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
httpClient.getConnectionManager().shutdown();
|
||||
|
||||
if (in != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
in.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
public <T> T Execute(Class<T> returnClass, Object argument)
|
||||
{
|
||||
HttpClient httpClient = new DefaultHttpClient(_connectionManager);
|
||||
InputStream in = null;
|
||||
T returnData = null;
|
||||
String result = null;
|
||||
|
||||
try
|
||||
{
|
||||
HttpResponse response;
|
||||
|
||||
Gson gson = new Gson();
|
||||
HttpPost request = new HttpPost(_url);
|
||||
|
||||
if (argument != null)
|
||||
{
|
||||
StringEntity params = new StringEntity(gson.toJson(argument));
|
||||
params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
|
||||
request.setEntity(params);
|
||||
}
|
||||
|
||||
response = httpClient.execute(request);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
in = response.getEntity().getContent();
|
||||
|
||||
result = convertStreamToString(in);
|
||||
returnData = new Gson().fromJson(result, returnClass);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.out.println("Error executing JsonWebCall: \n" + ex.getMessage());
|
||||
System.out.println("Result: \n" + result);
|
||||
|
||||
for (StackTraceElement trace : ex.getStackTrace())
|
||||
{
|
||||
System.out.println(trace);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
httpClient.getConnectionManager().shutdown();
|
||||
|
||||
if (in != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
in.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
public <T> void Execute(Class<T> callbackClass, Callback<T> callback)
|
||||
{
|
||||
Execute(callbackClass, callback, (Object)null);
|
||||
}
|
||||
|
||||
public <T> void Execute(Class<T> callbackClass, Callback<T> callback, Object argument)
|
||||
{
|
||||
HttpClient httpClient = new DefaultHttpClient(_connectionManager);
|
||||
InputStream in = null;
|
||||
String result = null;
|
||||
|
||||
try
|
||||
{
|
||||
HttpResponse response;
|
||||
|
||||
Gson gson = new Gson();
|
||||
HttpPost request = new HttpPost(_url);
|
||||
|
||||
if (argument != null)
|
||||
{
|
||||
StringEntity params = new StringEntity(gson.toJson(argument));
|
||||
params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
|
||||
request.setEntity(params);
|
||||
}
|
||||
|
||||
response = httpClient.execute(request);
|
||||
|
||||
if (response != null && callback != null)
|
||||
{
|
||||
in = response.getEntity().getContent();
|
||||
|
||||
result = convertStreamToString(in);
|
||||
callback.run(new Gson().fromJson(result, callbackClass));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.out.println("Error executing JsonWebCall: \n" + ex.getMessage());
|
||||
System.out.println("Result: \n" + result);
|
||||
}
|
||||
finally
|
||||
{
|
||||
httpClient.getConnectionManager().shutdown();
|
||||
|
||||
if (in != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
in.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected String convertStreamToString(InputStream is)
|
||||
{
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
String line = null;
|
||||
try {
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line + "\n");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
public class LoginToken
|
||||
{
|
||||
public String Name;
|
||||
public String IpAddress = "0.0.0.0";
|
||||
public String MacAddress = "00-00-00-00-00-00-00-00";
|
||||
public String Uuid;
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package mineplex.bungee.account;
|
||||
|
||||
public class RankToken
|
||||
{
|
||||
public int RankId;
|
||||
|
||||
public String Name;
|
||||
}
|
@ -47,4 +47,9 @@ public class PlayerCount implements Listener, Runnable
|
||||
|
||||
event.setResponse(new net.md_5.bungee.api.ServerPing(serverPing.getVersion(), new Players(_totalPlayers + 1, _totalPlayers, null), serverPing.getDescription(), serverPing.getFaviconObject()));
|
||||
}
|
||||
|
||||
public int getTotalPlayers()
|
||||
{
|
||||
return _totalPlayers;
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,6 @@ public class RedisServerRepository implements ServerRepository
|
||||
Integer.parseInt(name);
|
||||
|
||||
server.setGroup(name);
|
||||
System.out.println("Changed to server group name : " + server.getGroup());
|
||||
}
|
||||
catch (NumberFormatException ex)
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ public class ServerMonitor
|
||||
private static Collection<ServerGroup> _serverGroups = null;
|
||||
private static Map<String, ServerGroup> _serverGroupMap = null;
|
||||
private static List<DedicatedServer> _dedicatedServers = null;
|
||||
private static HashSet<String> _deadServers = new HashSet<String>();
|
||||
|
||||
private static SimpleDateFormat _dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
|
||||
private static Logger _logger = Logger.getLogger("ServerMonitor");
|
||||
@ -192,7 +193,7 @@ public class ServerMonitor
|
||||
|
||||
if (onlineServers.contains(entry.getKey()))
|
||||
iterator.remove();
|
||||
else if (System.currentTimeMillis() - entry.getValue().getValue() > 30000)
|
||||
else if (System.currentTimeMillis() - entry.getValue().getValue() > 35000)
|
||||
{
|
||||
String serverName = entry.getKey();
|
||||
String serverAddress = entry.getValue().getKey();
|
||||
@ -275,12 +276,24 @@ public class ServerMonitor
|
||||
|
||||
private static void killDeadServers()
|
||||
{
|
||||
HashSet<String> deadServers = new HashSet<String>();
|
||||
deadServers.addAll(_deadServers);
|
||||
|
||||
_deadServers.clear();
|
||||
for (MinecraftServer deadServer : _repository.getDeadServers())
|
||||
{
|
||||
if (deadServers.contains(deadServer.getName()))
|
||||
{
|
||||
killServer(deadServer.getName(), deadServer.getPublicAddress(), "[KILLED] [DEAD] " + deadServer.getName() + ":" + deadServer.getPublicAddress(), true);
|
||||
|
||||
handleUserServerGroup(_serverGroupMap.get(deadServer.getGroup()));
|
||||
}
|
||||
else
|
||||
{
|
||||
_deadServers.add(deadServer.getName());
|
||||
System.out.println("[IMPENDING DEATH] : " + deadServer.getName() + ":" + deadServer.getPublicAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void handleUserServerGroup(ServerGroup serverGroup)
|
||||
|
Loading…
Reference in New Issue
Block a user