aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/utils/ChatUtils.java
diff options
context:
space:
mode:
authorRoseGoldIsntGay <yoavkau@gmail.com>2022-01-15 00:19:33 +0200
committerRoseGoldIsntGay <yoavkau@gmail.com>2022-01-15 00:19:33 +0200
commit252dedff670a8a456ae557b8ac7f1727bb7fd1b1 (patch)
tree996f83583518b3774155f9454cea901af8bae534 /src/main/java/rosegoldaddons/utils/ChatUtils.java
parent0acbdcf7cd4ee78544b8cf7fbf8fa48dd395f693 (diff)
downloadRGA-252dedff670a8a456ae557b8ac7f1727bb7fd1b1.tar.gz
RGA-252dedff670a8a456ae557b8ac7f1727bb7fd1b1.tar.bz2
RGA-252dedff670a8a456ae557b8ac7f1727bb7fd1b1.zip
2.5.2-pre1
Diffstat (limited to 'src/main/java/rosegoldaddons/utils/ChatUtils.java')
-rw-r--r--src/main/java/rosegoldaddons/utils/ChatUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/rosegoldaddons/utils/ChatUtils.java b/src/main/java/rosegoldaddons/utils/ChatUtils.java
index 4295c77..43107eb 100644
--- a/src/main/java/rosegoldaddons/utils/ChatUtils.java
+++ b/src/main/java/rosegoldaddons/utils/ChatUtils.java
@@ -18,7 +18,9 @@ public class ChatUtils {
/* § */
public static void sendMessage(String message) {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§f[§aRoseGoldAddons§f] "+message));
+ if (Minecraft.getMinecraft().thePlayer != null) {
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§f[§aRoseGoldAddons§f] " + message));
+ }
}
public static ChatStyle createClickStyle(ClickEvent.Action action, String value) {