Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

This is possible I assume, can't find the event listener name. Basically when the client finishes initializing and goes to the main screen.

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/

  • Author
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.

  • Author
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.

  • Author
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

  • Author
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.

  • Author
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.

  • Author
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.

  • Author

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

  • Author
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 ;)

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.

  • Author
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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.