Jump to content

Recommended Posts

Posted

Is there a way to get server identifiable values when logging onto a server. I created a mod that I would like to have a config saved that tells the mod whether to activate or not when connecting to servers the user has visited in the past. This is a client side mod.

 

My mod is StepUp. This mod changes the stepHeight to 1 to allow walking up 1 block height instead of having to jump it. A lot of servers have anti-hack tools that prevent fly hacking and unfortunately this mod gets hit with that. I want to make it so when the player deactivates the mod in the server they are playing on, it writes to the config that tells it to either be activated or not next time they join that specific server.

 

Thank you for your time.

Posted

FMLNetworkEvent.ClientConnectedToServerEvent

is fired on the client side when you connect to a server (integrated or dedicated). When this fires, you can use

Minecraft.getMinecraft().getCurrentServerData()

to get a

ServerData

object describing the current server (including its IP/domain).

 

I explain more about this event and the

ServerData

class here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.