diff options
author | inglettronald <inglettronald@gmail.com> | 2023-03-22 02:56:04 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-03-22 02:56:04 -0500 |
commit | 2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a (patch) | |
tree | 595ae64cf933c6e0ffe9da363353666456a878f2 /src/main/kotlin/dulkirmod/utils/TextUtils.kt | |
parent | 2cb6f4cffee0ab505b35938cf71518e4640a229a (diff) | |
download | DulkirMod-2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a.tar.gz DulkirMod-2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a.tar.bz2 DulkirMod-2d250a5dd2250c9bd7ada1f9a5ef32f1fcf6166a.zip |
bugfixing
Diffstat (limited to 'src/main/kotlin/dulkirmod/utils/TextUtils.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/utils/TextUtils.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/utils/TextUtils.kt b/src/main/kotlin/dulkirmod/utils/TextUtils.kt index 6da1dd8..54072bc 100644 --- a/src/main/kotlin/dulkirmod/utils/TextUtils.kt +++ b/src/main/kotlin/dulkirmod/utils/TextUtils.kt @@ -5,6 +5,8 @@ import net.minecraft.util.ChatComponentText object TextUtils { fun info(text: String, prefix: Boolean = true) { + if (DulkirMod.mc.thePlayer == null) return + val textPrefix = if (prefix) "${DulkirMod.CHAT_PREFIX} " else "" DulkirMod.mc.thePlayer.addChatMessage(ChatComponentText("$textPrefix$text§r")) } |