Jump to content

Recommended Posts

Posted (edited)

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 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

Posted (edited)
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 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.

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.