Messages with events we can't handle are now thrown out

This commit is contained in:
DaMachinator 2018-01-23 13:30:07 -05:00 committed by Arcanitor
parent 2880f6c7a5
commit 2f4b4c0651
1 changed files with 6 additions and 2 deletions

View File

@ -21,11 +21,15 @@ class ServerChatHelper {
val message: String
if (!text.isEmpty()) {
val section: Char = '\u00A7'
message = when (nextMessage.event) {
"user_action" -> "* $user $text"
else -> "<$user> $text"
"" -> "<$user> $text"
"join_leave" -> section.toString()+"6-- $user $text"
else -> ""
}
FMLCommonHandler.instance().minecraftServerInstance.playerList.sendMessage(TextComponentString(message))
if (message.isNotEmpty())
FMLCommonHandler.instance().minecraftServerInstance.playerList.sendMessage(TextComponentString(message))
}
}
}