Jump to content

Recommended Posts

Posted

I would like to have a special feature of my mod switchable from the server. Thus, if the server host would like to switch the feature on, it will be used as soon as the client is connecting to the respective world, even if the client itself has switched the feature off. But if the client is connected to the internal server, the local setting should be used.

 

(a feature that would be somewhat annoying in ssp, but help reducing the overpowered impact of the mod on smp)

 

Now, the mod initialisation will be done when the client is started, not when the client connects to a world. I thought about a request packet from the client send to the server, which responds with a packet for the client with the respective flags.

 

But ... how can I trigger this event (client connects to the server) to send this messages? (should be triggered again when the client is connecting to the internal server to get the local settings...)

 

And... is there any other more sophisticated way to get a server flag override the client flag when connected

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

Posted

There is a user connected event for a reason.

Send the client the flag to trigger the feature, works fine..

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

that would be exactly what I am looking for :)

 

And even as this will make me sound like a complete idiot ... I can not find the described event?!

(looking in the package net.minecraftforge.event and respective sub packages... help??)

 

Edit:

Anybody any ideas?

 

I have tried EntityJoinWorldEvent with a check if the contained entity is of the EntityPlayer class, but with no prevail ... the event listener is called a hell lot of times for a hell lot of entities as soon as I connect to the server (with calls on server and client side). But no entity is of class EntityPlayer ...

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.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.

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.