diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt index a65da4387..ae04b4535 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt @@ -219,4 +219,9 @@ object ChatUtils { fun MessageSendToServerEvent.isCommand(commandsWithSlash: Collection<String>) = splitMessage.takeIf { it.isNotEmpty() }?.get(0) in commandsWithSlash + + fun MessageSendToServerEvent.senderIsSkyhanni() = originatingModContainer?.modId == "skyhanni" + + fun MessageSendToServerEvent.eventWithNewMessage(message: String) = + MessageSendToServerEvent(message, message.split(" "), this.originatingModContainer) } |