Posted September 11, 201411 yr Hi, I have an EvenHandler class with the PlayerRespawnEvent in it and it seems to not want to behave. I was using the Recommended version of Forge(10.13.0.1180), but I tried it even on the Latest version(10.13.0.1208) and it still doesn't work. This is my EventHandler class: public class HEventHandler { @SubscribeEvent(priority = EventPriority.NORMAL) public void playerRespawn(PlayerInteractEvent event) { LogHelper.info("INTERACT"); } @SubscribeEvent(priority = EventPriority.NORMAL) public void playerRespawn(PlayerRespawnEvent event) { LogHelper.info("RESPAWN"); } } And it's registered here: @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new HEventHandler()); proxy.init(); } In the console I get the "INTERACT" message when a player triggers it, so the EventHandler is working fine, I don't get the "RESPAWN" message when a player die and respawn.
September 11, 201411 yr Author I just had an idea, and it worked. You have to register your EventHandler on the FML bus to make it works. Like this: FMLCommonHandler.instance().bus().register(new HEventHandler()); instead of MinecraftForge.EVENT_BUS.register(new HEventHandler());
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.