Razboy20
Members-
Posts
4 -
Joined
-
Last visited
Everything posted by Razboy20
-
Send Message from Server to Client without Client-side Mod
Razboy20 replied to Razboy20's topic in Modder Support
@SideOnly(Side.SERVER) @SubscribeEvent public void onDeath(PlayerEvent.Clone event) { if (event.wasDeath) { final String[] messages = {"Oh boiss we got a respawner O_O", "How dare ye respawn on me?", "GAAH! You died again!", "._. Just why...", "Was taht me or waas that you? -.-","Why isn't this in hardcore mode? It should be..."}; Random random = new Random(); int index = random.nextInt(messages.length); ChatComponentText text = new ChatComponentText(messages[index]); ChatStyle style = new ChatStyle(); style.setColor(EnumChatFormatting.LIGHT_PURPLE); text.setChatStyle(style); FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().sendChatMsg(text); System.out.println("Respawned"); } } } Here is the code. -
Send Message from Server to Client without Client-side Mod
Razboy20 posted a topic in Modder Support
I have been trying to make a mod for a 1.7.10 server (To put in a 1.7.10 mod pack) that can message all of the players online. I have looked this question up, and have not found any answers. How would I send a message to all of the players on the server? (When trying to do so, it only outputs to the console, and I believe that is because the mod is not installed on the client side.) I am brand new at forge and java, so any help would be appreciated. -
Nevermind found the problem. Java file was in the wrong place.
-
I am new to java and modding, but I think I have the bare essentials of a mod. I am unsure of why I am getting this error; I have looked it up and nothing has helped me. Error: FML has found a non-mod file Webpage Connector-1.7.10.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible. Thanks, -Raz badmod.zip