Added ignore check for bungee updating.
Fixed PlayerCount for bungee's Fixed bug with Party.
This commit is contained in:
parent
4ec728d6cb
commit
c4c81085c5
@ -27,7 +27,7 @@ public class PlayerCount implements Listener, Runnable
|
||||
private Plugin _plugin;
|
||||
|
||||
private HashMap<String, InetSocketAddress> _otherBungeeInstances;
|
||||
private int _totalPlayers;
|
||||
private int _totalPlayers = -1;
|
||||
private int _totalMaxPlayers;
|
||||
|
||||
private int _tempPlayers;
|
||||
@ -47,7 +47,7 @@ public class PlayerCount implements Listener, Runnable
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
{
|
||||
_tempPlayers = _plugin.getProxy().getOnlineCount();
|
||||
_tempMaxPlayers = 0;
|
||||
|
||||
@ -93,7 +93,7 @@ public class PlayerCount implements Listener, Runnable
|
||||
try
|
||||
{
|
||||
socket = new Socket();
|
||||
socket.setSoTimeout(3000);
|
||||
socket.setSoTimeout(5000);
|
||||
socket.setTcpNoDelay(true);
|
||||
socket.setTrafficClass(18);
|
||||
socket.connect(address, 3000);
|
||||
@ -102,11 +102,13 @@ public class PlayerCount implements Listener, Runnable
|
||||
|
||||
dataOutputStream.writeByte(254);
|
||||
|
||||
dataOutputStream.writeByte(74);
|
||||
dataOutputStream.writeByte(1);
|
||||
dataOutputStream.writeByte(254);
|
||||
writeString("MC|PingHost", dataOutputStream);
|
||||
writeString("MC|PingHost", dataOutputStream);
|
||||
dataOutputStream.writeShort(3 + 2 * address.getAddress().getHostName().length() + 4);
|
||||
dataOutputStream.writeByte(74);
|
||||
|
||||
writeString(address.getAddress().getHostName(), dataOutputStream);
|
||||
dataOutputStream.writeInt(address.getPort());
|
||||
|
||||
|
@ -18,6 +18,7 @@ public class Updater implements Runnable
|
||||
private HashMap<String, String> _jarMd5Map = new HashMap<String, String>();
|
||||
private File _updateDirectory;
|
||||
|
||||
private boolean _enabled = true;
|
||||
private boolean _needUpdate = false;
|
||||
|
||||
public Updater(Mineplexer plugin)
|
||||
@ -32,8 +33,12 @@ public class Updater implements Runnable
|
||||
_updateDirectory = new File((windows ? "C:" : File.separator + "home" + File.separator + "mineplex") + File.separator + "update" + File.separator + "bungee");
|
||||
|
||||
_updateDirectory.mkdirs();
|
||||
|
||||
if (new File("IgnoreUpdates.dat").exists())
|
||||
_enabled = false;
|
||||
|
||||
_plugin.getProxy().getScheduler().schedule(_plugin, this, 1L, 1L, TimeUnit.SECONDS);
|
||||
if (_enabled)
|
||||
_plugin.getProxy().getScheduler().schedule(_plugin, this, 1L, 1L, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private void getCurrentMd5s()
|
||||
|
@ -201,7 +201,7 @@ public class Party
|
||||
|
||||
if (UtilTime.elapsed(_invitee.get(name), 60000))
|
||||
{
|
||||
Announce(F.name(name) + " did not respond to the Party ivnite.");
|
||||
Announce(F.name(name) + " did not respond to the Party invite.");
|
||||
inviteeIterator.remove();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user