Jump to content

[1.13.2] playerjoined event not firing


cleardragonf

Recommended Posts

So i've just started modding minecraft as i'm more use to sponge so i'm trying to piece things together...can someone explain why 

@Mod("asuramagica")
public class Main 
{
	public static Main instance;
	public static String modid = "asuramagica";
	private static final Logger logger = LogManager.getLogger(modid);



	public Main() {


		
		
		instance = this;
		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::arrowNocked);
		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries);
		
		MinecraftForge.EVENT_BUS.register(this);
		
		
	}

	public void arrowNocked(PlayerEvent.PlayerLoggedInEvent event)
	{
		System.out.println("Testing");
	}

	private static void init(final FMLServerAboutToStartEvent event){
		
	}

	private void setup(final FMLCommonSetupEvent event){
		logger.info("Setup method registered.");
	}
	
	private void clientRegistries(final FMLClientSetupEvent event){
		logger.info("clientRegistries method registered.");
	}
}

 

is not pushing out Testing to the console....when a Player joins the server? i've tried both this way and

@Mod("asuramagica")
public class Main 
{
	public static Main instance;
	public static String modid = "asuramagica";
	private static final Logger logger = LogManager.getLogger(modid);



	public Main() {


		
		
		instance = this;
		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries);
		
		MinecraftForge.EVENT_BUS.register(this);
		
		
	}
	@SubscribedEvent
	public static void arrowNocked(PlayerEvent.PlayerLoggedInEvent event)
	{
		System.out.println("Testing");
	}

	private static void init(final FMLServerAboutToStartEvent event){
		
	}

	private void setup(final FMLCommonSetupEvent event){
		logger.info("Setup method registered.");
	}
	
	private void clientRegistries(final FMLClientSetupEvent event){
		logger.info("clientRegistries method registered.");
	}
}

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.