Solved How to get IP Address of Offline Player

Discussion in 'Plugin Development' started by wowlover6877, Oct 25, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    wowlover6877

    Does anyone know how to get the IP address of an offline player using the essentials API? I looked in their source code, but I still can't get it to work.
     
  2. Offline

    Courier

    That doesn't make any sense. They don't have an IP address if they aren't connected. Do you mean the last IP address they used to connect to your server? You would need to keep track of that.
     
  3. Offline

    Infamous Jeezy

    Yes as Courier said you'd have to store it and then save it when the server shuts down.
     
  4. Offline

    wowlover6877

    Courier
    Sorry, I should have been more clear. What I mean is this:
    Essentials stores every players IP address in a file, so I was wondering how to call on those files with the Essentials API and get the IP listed in them.
     
  5. Offline

    bob7

    Look at essentials API
     
  6. Offline

    bigdan3434

    The console usually says blah blah blah has connected with the ip of: (the ip)
     
  7. Offline

    wowlover6877

    This is not very helpful, did you read the title of the post?

    "How to get IP Address of Offline Player"
     
    CD3 likes this.
  8. Offline

    bigdan3434

    oh... srry geez
     
  9. Offline

    md_5

    Well your title is flawed since an offline player has no ip. If you want to get their last ip, simply store it onPlayerQuit toa file and then look it up, as others have said.
     
  10. Offline

    wowlover6877

    md_5
    Well, my title might be flawed, but I clearly asked, "Does anyone know how to get the IP address of an offline player using the essentials API?". So basically I'm asking how to pull the IP out of the player data storage files that Essentials makes. (No use in duplicating work thats already done)
     
    PatoTheBest likes this.
  11. Offline

    md_5

    I would advise against it since it means people need Essentials to use your plugin.


    Essentials.getOfflineUser().getLastLoginAddress();

    Where Essentials is a reference to the essentials plugin.
     
  12. Offline

    CD3

    Just make your own reader method.
     
  13. Offline

    kreashenz

    CD3 Seriously, you gutta look at these dates. This thread is 9 months old, and it was solved. Why revive it?
     
    Cirno, pointfit and Faith like this.
  14. Offline

    CD3

    Because I had something to contribute?
     
  15. Offline

    kreashenz

    CD3 It was already solved..
     
    jdawgerj515 likes this.
  16. Offline

    CD3

    Yes, But its still helping others. It's not a lot... but it may help someone.

    Besides, its not like trying to help after it's done is a crime or anything.
     
  17. Offline

    zin0na5

    download ip-check and do /c <player>
     
Thread Status:
Not open for further replies.

Share This Page