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 zatwierdzone przez Arcanitor
rodzic 2880f6c7a5
commit 2f4b4c0651
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -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))
}
}
}