Double Log In

Discussion in 'Plugin Development' started by KaBob, Apr 24, 2012.

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

    KaBob

    As a personal feature in my plugin I'm trying to include a command that will let my change my user name so I can log in twice. However, I've tried changing the name, display name, list name and even UUID but it still glitches up whenever I log in with a second client.

    Does anybody know how to get around this issue? Hacky fixes are ok because this isn't a real command in my plugin, its just to help me debug issues that require 2 players so it wont matter if it breaks with every update.
     
  2. Offline

    stuntguy3000

    Do not try a hacked client, do not use a hacked client and DO NOT PUT YOUR SERVER INTO OFFLINE MODE
     
  3. Offline

    desht

    If you're just doing this to debug your plugin:
    • Put your server into offline mode. But before you do that, be very sure it's not publicly accessible. Use non-routable address space, firewall your PC, add a whitelist ...
    • In the minecraft client, attempt to log in with a bad password, and click "Play Offline" when you get the option. You can then log into your offline-mode server as "Player".
    That should be enough for testing purposes. No client hackery needed.
     
  4. Offline

    BoorMachine

    Im just trying to help.
     
  5. Offline

    Iron_Crystal

    What is wrong with putting a local hosted server that you are the only one that uses in offline mode?
     
  6. Offline

    desht

    Nothing whatsoever, as long as the server is adequately protected.
     
  7. Offline

    stuntguy3000

    But if its not just local... Well your not going to have a bright day xD
     
  8. Offline

    KaBob

    Well yeah I could do the offline trick but I was hoping to find a code solution so that I wouldn't have to deal with switching between online and offline mode. I mean, this problem is probably just a single variable or object I need to change/update, it's just a matter of where it is within bukkit.

    By hacky fixes I meant less than ideal coding =p
     
  9. Offline

    Iron_Crystal

    Why would one have a public server for testing your plugins? I keep mine local just because I want to be able to turn it off all the time if something goes haywire, not have to deal with other players, etc
     
  10. Offline

    stuntguy3000

    Actually, why do you want another "account" to use 0.o
     
  11. Offline

    Iron_Crystal

    Lol I don't even know what hes doing...
     
  12. Offline

    SirTyler

    Simple solution is run two launchers on your machine; one logged in, other offline.
    I am certain there is no code in bukkit that allows multiple connections from the same player, as this is hard coded into minecraft to not work.
     
  13. Offline

    Lolmewn

    I always use my brothers account if I need more ^^
     
  14. Offline

    KaBob

    That is true, but if you change the players name after they log in it bypasses that limitation.

    However, the name is still stored in some obscure part of bukkit which causes glitches whenever I log in from the second client. I don't get kicked, but it gets confused and thinks both players are the same despite the changed name. I've been searching through the code for where the issue might be and the closest I've come has been the players list in CraftEntity. It stores the players name connected to the player object but I couldn't figure out how to update the list for the new name.

    My mod does a lot of stuff that requires 2 players to test, such as riding other players, teleporting to them, pvp stuff, etc.
     
Thread Status:
Not open for further replies.

Share This Page