Jump to content

Help with saving NBT from GUI


TesterTesting135

Recommended Posts

you could e.g send a packet to the server when you close the gui or press a button.

the server will handle the message do something (or not) and will then (if it was succesful) send a packet back to the client. this is important to prevent cheating and stuff all changes should be made on the server and then synced with the client. 

 

for packets look up SimpleNetworkWrapper: https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/

you have to send a packet to the server with the data -> server checks the data, if its valid -> do something -> send a packet back to the client to update the data

in the packets you send the data and in the handler you decide what happens with that data 

Edited by eatthenight
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.