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

Is there a way (with Forge or Java) to get the current users IPV4 address?

 

  • Author
Just now, diesieben07 said:

Yes. Why? Which IP exactly?

 

The IP of the user that is currently using the mod, need it for login purposes.

  • Author
Just now, diesieben07 said:

I don't see why you would need the IP for login purposes. And again: which IP? The private IP? Public? 

 

Public.

Why? Dont skip over this question like you did twice.

Mods shouldn't be phoning home or anything to need users information.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author
1 minute ago, LexManos said:

Why? Dont skip over this question like you did twice.

Mods shouldn't be phoning home or anything to need users information.

 

 

As I said before, I use it for login purposes - if a user is trying to log in to a certain place from the mod without permission (wich will be defined by his public IP address) he will not get access.

 

It's a public IP address, just like server owners can get.

  • Author
Just now, diesieben07 said:

If you are qualified enough to program a login process (it's quite a lot more complicated than you might think) then you know how to get the user's IP.

 
 

This is why I'm asking for help here, all I want to do is this:

 

> Click a button

>Checks IP

>If IP is identical > enter

If not > don't

 

Why are all the questions? what will I do with someone's IP...

  • Author
1 minute ago, diesieben07 said:

So, now we are getting at least somewhat closer. What you described has nothing to do with a login process, you want an IP whitelist. Why? Vanilla already has IP bans.

 

It's sort of a login in a way.

The thing is I don't want to ban IPs I want to check them to see if the player has permissions to for example get "admin options" inside my mod.

I just thought it can be pretty cool

  • Author
Just now, diesieben07 said:

I don't see why you want that tied to IP. It makes no sense. If user A logs in from their friend's house they will have a different IP, but they are still the same person.

Admin rights should be based on the user identity, i.e. UUID.

 

It shouldn't be open to everyone, that's the thing.

I want the use to be only for my IP or anyone else's IP that I decide to add.

What do you mean by UUID?

  • Author
Just now, diesieben07 said:

Then restrict it by UUID.

 

People don't always have static IPs. If you get internet via DSL or are on a mobile network you will get a new IP at least every 24 hours.

IP ≠ person.

 

Every Mojang account / Minecraft user has a UUID. You can find yours via (for example): https://mcuuid.net/.

 

And I can access that using mc.player?

We will not help you make backdoors into your own mods.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

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.