[solved]player.hidePlayer(Player) can still be seen by a modified client?

Discussion in 'Plugin Development' started by CorrieKay, May 8, 2012.

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

    CorrieKay

    Im fairly sure my code didnt mess up, but that is a possibility.

    However, i was hidden on my server, and a user was able to see me, without a doubt.

    I figured with the way it worked (because you dont bump the other player, dont show up on their tab-list, all that stuff) that it just never sent the entity packet of the hidden player :s
     
  2. Offline

    theguynextdoor

    With modified clients they have many features to get past invis plugins, they have tracers which they place on players which basically show a line to that player. They can have a radar to say which players are nearby, and i dont believe there is much you can do against this. I would love to be proved wrong though.
     
  3. Offline

    CorrieKay

    well the only way they can do that is if their client knows where the player is.

    Which i thought hidePlayer() did :\
     
  4. Offline

    Jogy34

    It could be that the player logged on after you used hidePlayer() on everyone that was online but forgot to do it to people right when they log in
     
  5. Offline

    CorrieKay

    hmm, maybe theres a bug, but the join method in my invisibility handler should deal with that.

    In fact, my invisibility handler has worked flawlessly up until this one player
     
  6. Offline

    Orcem12

    @CorrieKay
    Maybe spout? Have you confronted him about it?
     
  7. Offline

    CorrieKay

    i dont use spout, this is purely from the bukkit api.

    player.hidePlayer(player2); makes player2 invisible from player, its a method in the player object. im not sure when they added it, but it was fairly recently, within the last 3-4 months at most, iirc.
     
  8. Offline

    Orcem12

    @CorrieKay
    I don't know of many modded clients that allow vision of well, everything, but I do know of Bukkit bugs. Maybe we could have a pseudo-code snippet of your Invisibility Handler?
     
  9. Offline

    CorrieKay

    sure, the entire thing is right here for reference.

    Heres the gist of how it works.

    Whenever a player logs in, it looks at the players custom config file. Inside theres a boolean, if true, theyre hidden, if not, theyre visible.

    Whenever a player logs in, it loops through the online player list. if the player is hidden, it hides them from each player (unless the player is me, then it doesnt hide them). Then, it checks if the iterating player is hidden themselves. If they are hidden, it hides them from the logging in player (again, except from me)

    Basically,
    Player player1 = logging in player
    for(Player player2 : online Players){
    if(isPlayer1Hidden){
    player2.hide(player1);
    }
    if(player2 is hidden){
    player1.hidePlayer(player1);
    }
    }

    This should deal with all players, though if anyone can think of a way around it, i would love to make my invisibility handler work better :3
     
  10. Offline

    xboxhacks

    Modified Clients detect invisible players by sending packets. Thats why clients can't detect players using VanishNoPacket. Also if you want to test to make sure your invisible and can't be detected by modified clients go on Hackforums and then under the greifing section in the minecraft section there are heaps of clients, Just find one with AntiVanish
     
  11. Offline

    Superkabii

    What? NoPacket uses the Bukkit API.
     
  12. Offline

    Jogy34

    Yes but it doesn't use hidePlayer() it uses an alternet method which is the same one that people used before the hidePlayer() method was instantiated into the bukkit api which was to manually stop the packets of the player from being sent to the other clients.
     
  13. Offline

    CorrieKay

    so then the packets are still being sent to the players? :\
     
  14. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Wow, nearly everyone in here making authoritative statements about the vanish API or my plugin has no idea what they're talking about. Your join method won't work because you're doing showPlayer instead of hidePlayer ;)
     
  15. Offline

    Jogy34

    First of all the last time I looked through the code for VanishNoPacket was a few weeks ago, when I needed to be able to hide a player for one of my plugins, and you were still doing the old way of stopping the packet from being sent manually and that was before I personally knew about the hidePlayer() method in bukkit but at that time the method was still out.

    Second *face palm*

    Also I really admire your work, great job.
     
  16. Offline

    CorrieKay

    hold it, thats other players. thats showing all other players to the joining player IF they are not in the hidden list.
     
  17. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    It's been months since I used the spout methods. :p

    I don't see you calling hidePlayer from your join method at all.
     
  18. Offline

    Jogy34

    Spout Methods? The hidePlayer() method is a new method in the bukkit API if that's what you're talking about.
     
  19. Offline

    Komak57

    If you'd like, i'd be more than willing to join in under different circumstances and addons to see if any work or not?
     
  20. Offline

    CorrieKay

    turnOn/turnOff methods
     
  21. Offline

    desht

    None of your event handlers in that class appear to have the @EventHandler annotation. I can see the handlers in Mane.java are correctly annotated, but your custom event handlers need annotating too...
     
  22. mbaxter used the spout equivalent of hidePlayer() before. That's why his plugin depended on spout. Just check it's changelog:
     
  23. Offline

    dsmyth1915

    mbaxter ; corries join events refer to his turnOn/turnOff methods. turnOff has showPlayer() and turnOn has hidePlayer(). As for the "invis" If I'm not mistaken, hidePlayer() only disables the name and skin packets sent from the hidden player, to other players. not anything else. So in theory, a player with a modded client can check to see what packets were sent to him, what the name of the person was, and the redefine the players skin as a Steve clientside.

    This is my guess on how vanishNopacket works, it disables all sent out packets to other players, but not to the server. So that you can interact with the server(IE move chat etc), but the players won't get any of the movepackets, skin, or name.

    That's my theory on that. Hope it helps :)
     
  24. dsmyth1915
    1)
    So no matter if there's hidePlayer() or not - it's never called as the handlers aren't registered.

    2)VanishNoPacket works with player.hidePlayer(player2); I'll bet, cause you don't need any more actions... Just look into the CraftBukkit sources if you don't believe me: player2 gets removed from player1s EntityTracker - the result is that player2 don't exist for player anymore and as such no spawn/move (there are no name and skin packages) will be send.
     
  25. Offline

    Iron_Crystal

    Just backing them up, when the player is hidden, the visible players can't interact with them. Ie, hidden players can go through visible players, visible players can't attack the hidden players even if they hit them...They just aren't there any more.
     
  26. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    I just use the bukkit API for hiding/revealing players. No special magick there.
     
  27. Offline

    CorrieKay

    my plugin is built very non-standardly. All events are called in the superclass down through this method. All events are hand-registered, instead of all at once with registerEvents().

    The purpose of this is because my plugin logs all exceptions, so i can take a look at them later, instead of relying on users reporting the bugs. To do that, i had a single method catch a "generic" Event, then it passes that event into the subclass, which then filters by instanceof, and cast/pass the event into the specific event handler method.

    Please note, this plugin has functioned absolutely perfectly up until this incident.
     
  28. Offline

    nisovin

    When a player joins, and is not invisible, you never hide the currently invisible players from him.
     
  29. Offline

    dsmyth1915

    @v10tracker I would love to see the code for hideplayer. But both the APIdocs and doxygen don't reference it from player, entity, or testPlayer. I can't find it ANYWHERE. nisovin ; On the player login she loops through the joined player and all players online and runs those players through turnOn.
     
  30. Offline

    ZachBora

    When the invisible player logins or when new players login to remove the invisible players?
     
Thread Status:
Not open for further replies.

Share This Page