I've just noticed, that after each colon is something written like "OK". If you start the mcserver, it seems like, that there is a message/output missing:
mcserver@lgsm-debian8:~$ ./mcserver start
[ WARN ] Starting mc-server: Check RAM: 1G required, 986M available
* Minecraft server may fail to run or experience poor performance.
[ OK ] Starting mc-server:
mcserver@lgsm-debian8:~$
Shouldn't be there an "OK" or something like that? If not, I would like to suggest, to remove this colon to prevent irritated users.
@dgibbs64 Told ya ! :p
Blame Minecraft not having a server name like every other game server
So...
https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/info_config.sh#L71
Easy workaround to minecraft having no server name is to add
servername="Minecraft Server"
Should we do it ?
PS @Sebi94nbg There should be the server name after : , and as far as i know, there is none for MC, that's why it's left blank. The problem here is that we won't rewrite the whole function just for MC, and it can be confusing to add a generic name as well as it doesn't respect LGSM's standards.
I'm not one to encourage defining variables that are exposed at the top level way down deep in the functional plumbing.
A reasonable approach would be to set
: ${servername:="Minecraft Server"}
so that if there ever was a way to set servername in the top-level script, this assignment under-the-hood would be ignored.
I'm not sure, but as far as I can remember myself, the _motd_ variable is used as servername. If you search for your server, you'll see that message, the counter of max. players and the status of this server.
motd=A Minecraft Server
However, this value could be used instead of displaying nothing or setting a static variable somewhere.
There was a "server-name" settings in MC classic, but seems there is not anymore.
"motd" isn't a servername, and can take up to two lines using \n, which wouldn't be adapted.
servername=${servername:-"Minecraft Server"}
Or
servername=${servername:-"Generic Minecraft Servername as Minecraft doesn't allow to set a server name, sorry, there's nothing we can do about it, blame Minecraft, sorry again lololol"}
lol. Clearly the second one! :+1:
Just an odd point with minecraft motd the gameq php lib returns the motd as the server name and to a degree so does the minecraft interface

and gameq

and of course http://www.gameserverdirectory.com/search.php?q=37.122.211.130&players=&game=&bots=&country=&pwd=&map=&type=&version=&claimed=&tags=
so it may be worth considering it
motd = Minecraft Server Jims XX
Then what about:
servername=$(grep "motd=" "${servercfgfullpath}" | sed 's/motd=//g' | tr -d '=\";' | sed 's/\\n/ /g')
(replace linebreaks with spaces)
or
servername=$(grep "motd=" "${servercfgfullpath}" | sed 's/motd=//g' | tr -d '=\";' | sed 's/\\n.*//g')
(only use first line)
I'd go for first line only, otherwise it could be too long.
Let's add it :D
There is also the point that if the install routine shuts motd to one line there is a chance it will be buried in server.properties & get forgotten
Just a bit shorter:
grep "motd=" "${servercfgfullpath}" | cut -d '=' -f 2 | sed 's/\\n/ /g'
@JimTR Went for the one line !
@Sebi94nbg Let's stick with set | tr for coherence with other ones. :o))
Look how beautiful it is ! :o))

Well, everyone can now run ./mcserver uf and go home :o))
Bar is closing, cya ! :o))
oddly if you add /n to produce a second line gameq ignores it & makes it a one liner but the minecraft interface adds the line break so I guess you need to make people aware on install as to the different properties ... but I guess one line is good
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Blame Minecraft not having a server name like every other game server