[REQ] Real invisibility

Discussion in 'Archived: Plugin Requests' started by LEOcab, Dec 24, 2013.

  1. Offline

    LEOcab

    So we have this problem where people use radar hacks to see people with invisibility potions. It's a good way to spot hackers - I log in with an alt account that nobody knows about, drink a potion of invisibility, and teleport some ~50 blocks from a suspected hacker and then wait for him to start running in my direction. I've proudly spotted and banned 3 motherfrakkers this way.

    This is a good admin tool but it also sucks for players because I can't be on 24/7, and even when I'm on I don't want to spend all of my time hovering over combatants with /vanish to see who is having too much accuracy versus invisible players. It makes invisible potions useless sometimes, and when people complain about a certain person doing this, I can't ban them because I have no proof, they may just have been lucky.

    So I'm wondering if someone could write a plugin that makes invisible potions turn players truly invisible, the way /vanish does, but without taking their ability to attack or be attacked. As a bonus it would be nice to still have the particle effects but I can live without those. I'd just call it a "hardcore" feature. In fact scratch that, get rid of particles too. Someone could just edit the particle sprite to a bright fuchsia box and cheat without even downloading a client.
     
  2. Offline

    Bionicrm

    As far as I know, it'd be impossible to do this. Well, in a way, maybe, but truly vanishing a player would prevent showing partical effects, anything that's in your hand, and armor. I would just keep trying to catch the hackers. If you get plugins to do all the hacker-catching for you, where's the fun in that??? :p
     
  3. Offline

    Garris0n

    It's possible but a huge pain to do, put simply. The server would have to calculate whether the player is looking at the invisible player manually and deal the correct amount of damage...I doubt anybody will do this.
     
    Bionicrm likes this.
  4. Offline

    Monkeyboystein

    Technically... It is simple & possible. not sure how well this would work but lets try this:
    Code:java
    1. @EventHandler
    2. public void onMove(PlayerMoveEvent event)
    3. {
    4. Player p = event.getPlayer();
    5. if(p.hasPotionEffect(PotionEffectType.INVISIBILITY))
    6. {
    7. getConfig().set(p.getName(), true);
    8. saveConfig();
    9. reloadConfig();
    10. for(Player everyone : Bukkit.getOnlinePlayers())
    11. {
    12. everyone.hidePlayer(p);
    13. }
    14. }
    15. else if(!p.hasPotionEffect(PotionEffectType.INVISIBILITY) && getConfig().getBoolean(p.getName()))
    16. {
    17. for(Player everyone : Bukkit.getOnlinePlayers())
    18. {
    19. everyone.showPlayer(p);
    20. }
    21. }
    22.  
    23. }


    Theoreticly speaking, it wouldnt sent the packets to the hacker therefore, invisible!

    I will make this i just wanted to inform the people who commented it would be hard that its not as hard as they may think! :)
     
  5. Offline

    Garris0n

    Monkeyboystein

    That's the easy part. Now figure out how to make it so you can hit the invisible player. Not to mention calculating the damage necessary. There's probably some NMS method for the second part, but the first will be a pain to say the least.

    Also, the correct way to do this would be to loop through the players online and check their potion effects and then vanish and unvanish them accordingly. Also, have fun being compatible with vanish plugins.
     
  6. Offline

    Bloxcraft

    Garris0n


    Just use player.getLineOfSight and distance calculations for that first part
     
  7. Offline

    Bionicrm

    Well, considering that this is technically possible, it wouldn't be practical. You're basically making the server do the things that the client is supposed to handle... they're rendered on the client for a reason :/
     
  8. Offline

    Garris0n

    It's a block iterator. That method is both inefficient and inaccurate.
     
  9. Offline

    Minecrafter_NL

    ShotBow network has this in the game annihilation in a kit, so it must be possible
     
  10. Offline

    Bionicrm

    Minecrafter_NL How do you know? Are you sure they're doing what OP is asking for? Also, we already concluded that it was possible, but it would be impractical and difficult... calculating that stuff on a server for everyone seems bad.
     
  11. Offline

    MrSnare

    Annihilation has players vanish when they drink an invisibility potion but still displays the invisibility particles and sprint particles
     
  12. Offline

    Garris0n

    It's easier to do in a proprietary situation.
     

Share This Page