Posted November 6, 20159 yr Client it can print but server not print. @SubscribeEvent public void onEvent(LivingDeathEvent entity) { System.out.println("Boing"); }
November 6, 20159 yr That should work on both sides. How are you registering the event handler? Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
November 6, 20159 yr Author I have already registered. but it can't print. main file. @EventHandler public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new EventManager()); } file. public class EventManager { @SubscribeEvent public void onEvent(LivingDeathEvent entity) { System.out.println("Boing"); } }
November 6, 20159 yr How do you know it's not printing on the server? Are you checking the server output log? Also, why are you so certain it is printing on the client and not the server? "Boing" isn't exactly descriptive, especially when using System.out.println instead of a Logger. http://i.imgur.com/NdrFdld.png[/img]
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.