Add support for other mods using /locraw
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package moe.nea.firmament.events
|
||||
|
||||
import net.minecraft.text.Text
|
||||
import moe.nea.firmament.util.unformattedString
|
||||
|
||||
/**
|
||||
* Published just before a message is added to the chat gui. Cancelling only prevents rendering, not logging to the
|
||||
* console.
|
||||
*/
|
||||
data class ClientChatLineReceivedEvent(val text: Text) : FirmamentEvent.Cancellable() {
|
||||
val unformattedString = text.unformattedString
|
||||
|
||||
companion object : FirmamentEventBus<ClientChatLineReceivedEvent>()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package moe.nea.firmament.events
|
||||
|
||||
import net.minecraft.network.packet.Packet
|
||||
|
||||
data class OutgoingPacketEvent(val packet: Packet<*>) : FirmamentEvent.Cancellable() {
|
||||
companion object : FirmamentEventBus<OutgoingPacketEvent>()
|
||||
}
|
||||
@@ -23,9 +23,9 @@ import moe.nea.firmament.util.unformattedString
|
||||
|
||||
/**
|
||||
* This event gets published whenever the client receives a chat message from the server.
|
||||
*/
|
||||
* This event is cancellable, but should not get cancelled. Use [ClientChatLineReceivedEvent] for that instead. */
|
||||
data class ServerChatLineReceivedEvent(val text: Text) : FirmamentEvent.Cancellable() {
|
||||
companion object : FirmamentEventBus<ServerChatLineReceivedEvent>()
|
||||
|
||||
val unformattedString = text.unformattedString
|
||||
|
||||
companion object : FirmamentEventBus<ServerChatLineReceivedEvent>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user