Messages with events we can't handle are now thrown out
This commit is contained in:
parent
2880f6c7a5
commit
2f4b4c0651
|
@ -21,10 +21,14 @@ class ServerChatHelper {
|
||||||
val message: String
|
val message: String
|
||||||
|
|
||||||
if (!text.isEmpty()) {
|
if (!text.isEmpty()) {
|
||||||
|
val section: Char = '\u00A7'
|
||||||
message = when (nextMessage.event) {
|
message = when (nextMessage.event) {
|
||||||
"user_action" -> "* $user $text"
|
"user_action" -> "* $user $text"
|
||||||
else -> "<$user> $text"
|
"" -> "<$user> $text"
|
||||||
|
"join_leave" -> section.toString()+"6-- $user $text"
|
||||||
|
else -> ""
|
||||||
}
|
}
|
||||||
|
if (message.isNotEmpty())
|
||||||
FMLCommonHandler.instance().minecraftServerInstance.playerList.sendMessage(TextComponentString(message))
|
FMLCommonHandler.instance().minecraftServerInstance.playerList.sendMessage(TextComponentString(message))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue