Fix monitor killing servers with the new motd
This commit is contained in:
parent
2b99495e7b
commit
d85b6ee332
|
@ -106,13 +106,19 @@ public class MinecraftServer
|
|||
*/
|
||||
public boolean isJoinable()
|
||||
{
|
||||
if (_motd != null && (_motd.contains("Starting") || _motd.contains("Recruiting")
|
||||
|| _motd.contains("Waiting") || _motd.contains("Open in") || _motd.isEmpty() || _motd.contains("Generating")))
|
||||
if (_motd == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is super dodgy, this is the only way around monitor not killing game servers with the new MOTD system
|
||||
if (_motd.isEmpty() || _motd.contains("OPEN"))
|
||||
{
|
||||
if (_playerCount < _maxPlayerCount)
|
||||
{
|
||||
int availableSlots = _maxPlayerCount - _playerCount;
|
||||
return _motd.isEmpty() ? (availableSlots > 20) : true;
|
||||
|
||||
return !_motd.isEmpty() || (availableSlots > 20);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue