fix playerlist command and add download link

Esse commit está contido em:
NikkyAI 2018-02-08 22:08:35 +01:00 commit de Unknown
commit 67385b5f3b
2 arquivos alterados com 10 adições e 3 exclusões

Ver arquivo

@ -25,4 +25,8 @@ requires api section to be setup along these lines
``` ```
values you need to remember are obviously the IP, port and token values you need to remember are obviously the IP, port and token
MatterLInk will need them in the configuration MatterLInk will need them in the configuration
## Downloads
https://ci.elytradev.com/job/elytra/job/MatterLink/job/master/

Ver arquivo

@ -11,10 +11,13 @@ object PlayerListCommand : IBridgeCommand {
override val help: String = "Lists online players." override val help: String = "Lists online players."
override fun call(args: String): Boolean { override fun call(args: String): Boolean {
if (args.isNotBlank()) return false if (args.isNotBlank()) return false
val playerList = FMLCommonHandler.instance().minecraftServerInstance.playerList.onlinePlayerNames
MessageHandler.transmit(ApiMessage( MessageHandler.transmit(ApiMessage(
username = cfg!!.relay.systemUser, username = cfg!!.relay.systemUser,
text = FMLCommonHandler.instance().minecraftServerInstance.playerList.onlinePlayerNames.joinToString(" ") { it.antiping() } text = when {
playerList.isNotEmpty() -> "players: " + playerList.joinToString(" ") { it.antiping() }
else -> "No Players online"
}
)) ))
return true return true