aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/gregtech/api/util/IMessage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/miscutil/gregtech/api/util/IMessage.java')
-rw-r--r--src/Java/miscutil/gregtech/api/util/IMessage.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Java/miscutil/gregtech/api/util/IMessage.java b/src/Java/miscutil/gregtech/api/util/IMessage.java
new file mode 100644
index 0000000000..4a1fa2d684
--- /dev/null
+++ b/src/Java/miscutil/gregtech/api/util/IMessage.java
@@ -0,0 +1,21 @@
+package miscutil.gregtech.api.util;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.ChatComponentText;
+
+public class IMessage {
+
+ public static void messageThePlayer(String s){
+ if(Minecraft.getMinecraft().thePlayer.worldObj.isRemote){
+ Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentText(s));
+ }
+ else if(!Minecraft.getMinecraft().thePlayer.worldObj.isRemote){
+ Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentText(s));
+ }
+ }
+
+ public void messageOtherPlayer(String s){
+ Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentText(s));
+ }
+
+}