Jump to content

client ask server for config entries ...


Torojima

Recommended Posts

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]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

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