Jump to content

Recommended Posts

Posted

Well, if you actually want to know if you're in the main screen I think you can just handle the GuiOpen event and check if it is the main screen gui. Otherwise, you can use the FML lifecycle events and assume that something like the post-init event should be after all the mods are loaded. Really depends on what you're specifically trying to do.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
8 hours ago, jabelar said:

Well, if you actually want to know if you're in the main screen I think you can just handle the GuiOpen event and check if it is the main screen gui. Otherwise, you can use the FML lifecycle events and assume that something like the post-init event should be after all the mods are loaded. Really depends on what you're specifically trying to do.

Post init is a little too early for me, I can't get the clients UUID when doing that at this time.

Posted
Just now, diesieben07 said:

This. Please provide more information.

I'm creating a permission system, It checks if the user has permissions to use parts of the mod or not.

My idea was to execute the permission check at post init but you can't get the user UUID at that time.

Posted
Just now, diesieben07 said:

That won't work, there can be more than one user. At post init there are no server-side users at all.

I know, so how can I use something that executes after it finishes

Posted
18 minutes ago, diesieben07 said:

Post init won't help you. Players can join and log out at any time. You need to check the permissions when the player actually tries to perform the potentially restricted action.

I know, the idea is you get a list of what you can or can't do, it saves it and disables client function accordingly.

So at the start of the client, it checks for permissions (GET request) and disables functions accordingly.

Posted
25 minutes ago, diesieben07 said:
  • Permission checks most likely must be done server side. The client cannot be trusted.
  • If client needs to know permission information for display purposes (disable a button, etc.), send the information from server to client using a custom packet in PlayerLoggedInEvent.

What if I create a client-side visual mod for example, that changes the way a mob is rendered everywhere, not only when connecting to a server.

Should I make a toggle somewhere (like a GET request) that gives the client the green light to render it differently? I was trying to load the permissions when the client is starting.

Posted
Just now, diesieben07 said:

What does this have to do with permissions? I don't think we are speaking of the thing in regards to permissions.

Probably, just a true-false boolean that tells the client if it is allowed to display something.

Posted
Just now, diesieben07 said:

How is this a "permission"? Anyways, the concept is the same:

 

Only way to implement this properly is to make two versions of your mod.

I see, alright I'll look into it.

Thanks ;)

Posted
3 hours ago, diesieben07 said:
3 hours ago, Coder said:

Or even for example if you want to include "pro" features in your mod only some people can use.

Only way to implement this properly is to make two versions of your mod.

 

Do remember that you can't ask for money with regards to features. It would violate the Minecraft EULA.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
On 2/5/2018 at 7:40 PM, Draco18s said:

 

Do remember that you can't ask for money with regards to features. It would violate the Minecraft EULA.

Yeah, it's not for that. Just making a mod with a control option that disables it.

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.