Posted July 13, 20187 yr Hello! I'm trying to make a message pop up when a player joins the world, similar to how mods like Mekanism lets players know if there's an update. However, it doesn't show up in-game, and when I add a system print line, the print line doesn't pop up in the console either. I know it's being registers and called properly, because the method is called in my WorldEventsHandler, and everything else in there works. @SubscribeEvent public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) { event.player.sendMessage(new TextComponentString("Voidaic Arcania: This mod is still in BETA. Additional gameplay information can be found in the wiki here: https://github.com/CammiePone/Voidaic-Arcania/wiki")); } If you need to poke around, here is the git: https://github.com/CammiePone/Voidaic-Arcania/blob/master/src/main/java/com/camellias/voidaicarcania/util/handlers/WorldEventHandler.java Note: this development is still in beta, and being developed by two people who are still learning, so sloppy code is to be expected. Edited July 14, 20187 yr by ModMCdl problem solved Follow these rules when talking to me, and we'll get along fine. 1).I know Java fairly well. I don't know as much about modding. They are not the same, don't compare them. 2). I consider myself to always be learning. I make mistakes, you make mistakes. Who doesn't? 3). Insult me, and I will leave the thread. I have a real life, I don't have time to throw petty insults in a Minecraft Modding forum. ModMCdl - Co-Founder and Director of Design for Artemis Game Studios
July 13, 20187 yr Your method needs to be static. Like the other ones in that class. Right now it is actually not registering properly as the @EventBusSubscriber annotation requires static methods. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
July 13, 20187 yr 1 Check if the entity instance is an EntityPlayer. 2 Check for client side. 3 What Jabelar said, too. Edited July 13, 20187 yr by Differentiation
July 13, 20187 yr Author 13 minutes ago, diesieben07 said: No. Login event is server-side. What? Why? So... don't do what they said? Also, @jabelar's idea worked out fine, so thanks. Can't believe I missed that! Edited July 14, 20187 yr by ModMCdl Follow these rules when talking to me, and we'll get along fine. 1).I know Java fairly well. I don't know as much about modding. They are not the same, don't compare them. 2). I consider myself to always be learning. I make mistakes, you make mistakes. Who doesn't? 3). Insult me, and I will leave the thread. I have a real life, I don't have time to throw petty insults in a Minecraft Modding forum. ModMCdl - Co-Founder and Director of Design for Artemis Game Studios
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.