1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Code creation] Servers can avoid annoying player fake-flying glitch.

Discussion in 'Plugins/Codes' started by lAngelP, Feb 7, 2016.

  1. lAngelP

    lAngelP Member

    Joined:
    Feb 1, 2016
    Messages:
    76
    Likes Received:
    7
    Trophy Points:
    8
    Gender:
    Male
    Hi!

    Last months I've heard a lot about a famous glitch in Minecraft Servers, it consists in (I WON'T SAY HOW TO DO IT), with 'magic' and a bit of trick, when you are falling you keep frozen on the air, and here in CubeCraft you get teleported back to where you fall.

    First we have to know that the Minecraft Client that uses this glitch doesn't update at all, it means it doesn't send packets to the server, but I noticed it still receives packet, but doesn't update what the user sees. So, knowing that it receives packets, we can patch that bug until Mojang finally fixes it. How to patch it is really easy, first you'll have to locate a player that doesn't move (we'll know that player as P), then, if after a certain amount of time, and under certain conditions based on the location of P, the type of blocks that surrounds him, etc... We will be sure that player is abusing that glitch, so, what's next? Just kill that player, he is falling and should not be alive.

    I write that post to say that the PvP servers must fix that unfair glitch.

    Here is a video to show how it works the patch I've developed:
     
    hgbf likes this.
  2. JvwerMcGames

    JvwerMcGames Member

    Joined:
    Jan 12, 2016
    Messages:
    452
    Likes Received:
    123
    Trophy Points:
    43
    Gender:
    Male
    Location:
    The Netherlands
    but if you fall down on your island
    For example: you jump off the Eiffel Tower
    get you also murdered?
     
    X_EpicM_X likes this.
  3. JvwerMcGames

    JvwerMcGames Member

    Joined:
    Jan 12, 2016
    Messages:
    452
    Likes Received:
    123
    Trophy Points:
    43
    Gender:
    Male
    Location:
    The Netherlands
    if you fall down on a island

    For example: you jump off the Eiffel Tower
    get you also murdered?
     
  4. Roebahn

    Roebahn Member

    Joined:
    Jan 13, 2016
    Messages:
    1,035
    Likes Received:
    324
    Trophy Points:
    83
    Gender:
    Male
    Occupation:
    Loving all the chickens
    Location:
    Netherlands
    Ive seen some players do this, thanks for the explanation.
     
    lAngelP likes this.
  5. Superherolinker

    Superherolinker Member

    Joined:
    Dec 11, 2015
    Messages:
    594
    Likes Received:
    453
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    Coder
    Location:
    In my lab, brewing a poison potion
    Nice skillz, I think this could really help
     
  6. Anmazing

    Anmazing Helper Staff Member Helper

    Joined:
    Aug 7, 2014
    Messages:
    1,342
    Likes Received:
    1,149
    Trophy Points:
    113
    Gender:
    Male
  7. lAngelP

    lAngelP Member

    Joined:
    Feb 1, 2016
    Messages:
    76
    Likes Received:
    7
    Trophy Points:
    8
    Gender:
    Male
    No, you only get killed once you are frozen in the air, if you are falling you won't get killed. In the video you can see that until the player stops moving it's still alive. I coded some exceptions to avoid killing unfairly.
     
  8. lAngelP

    lAngelP Member

    Joined:
    Feb 1, 2016
    Messages:
    76
    Likes Received:
    7
    Trophy Points:
    8
    Gender:
    Male
    Thanks to all. It took a little time for me to realize how the glitch worked exactly and how the Minecraft Client and Server tracks it.
    If Cubecraft implements it player will stop trying to do that. About one year ago almost nobody knew that, but now people are really abusing this. And here in Cubecraft it's worse as you get teleported to where you fall.

    Some more notes: As all my plugins/codes I reached a code that works optimized and nobody know the fix is there untill they try to use it.
     
  9. 123gijs

    123gijs Member

    Joined:
    Jun 17, 2015
    Messages:
    134
    Likes Received:
    17
    Trophy Points:
    18
    Gender:
    Male
    This should be added to the server!
     
    lAngelP likes this.
  10. lAngelP

    lAngelP Member

    Joined:
    Feb 1, 2016
    Messages:
    76
    Likes Received:
    7
    Trophy Points:
    8
    Gender:
    Male
    Thanks :p But this should also be fixed by Mojang.
     
  11. MegaAlen

    MegaAlen Member

    Joined:
    Nov 4, 2013
    Messages:
    103
    Likes Received:
    43
    Trophy Points:
    28
    Gender:
    Male
    Location:
    Slovenia
    Can you please report this bug to mojang? This needs to be fixed before 1.9 comes out in 2 weeks!
     
  12. Undead

    Undead Member

    Joined:
    Feb 10, 2016
    Messages:
    87
    Likes Received:
    59
    Trophy Points:
    18
    Gender:
    Male
    Occupation:
    Streaming & Building
    Location:
    My computer desk all day
    Your fix most likely has a lot of flaws, for example when it checks for those conditions whether they are falling or not what if you have fly? Does it check if your fly is enabled? What if you're in GM? This would slowly clog up the server and eventually just get to the point where it's unbearably laggy. Overall it just seems like a lag fest to me, you'd have a line for each player then it constantly checking those conditions for it to be fully effective, then once it checks it dumps it and refreshes. Maybe for a small server it'd be a good idea but for 100-200+ it just sounds like that plugin idea alone would cause issues, not to mention that it will most likely have conflictions with other plugins. It's a good idea, I just see a lot of bad and good with your idea.
     
  13. lAngelP

    lAngelP Member

    Joined:
    Feb 1, 2016
    Messages:
    76
    Likes Received:
    7
    Trophy Points:
    8
    Gender:
    Male
    I'll try to explain this.

    First, it is coded to not produce any lag at all (unless the hole Network is having Network issues, but that's different. Then, it doesn't need to check the conditions all time. It decides to kill you when it checks you two times, if both times it sees you're using the bug you are dead. Also, it only kills you if you are in survival or adventure and not able to fly, that should be added to the plugins to be even more compatible. I suppose all the plugins Cube has are custom, so that's why it won't produce any conflictions, each game has its own conditions to kill or not, plus some general conditions.

    Lastly, it's extremely optimized (The first idea was checking constantly the player position, but I dumped that idea in favor one the one I implemented). It won't cause any lag issues, as how it works.
     
  14. Undead

    Undead Member

    Joined:
    Feb 10, 2016
    Messages:
    87
    Likes Received:
    59
    Trophy Points:
    18
    Gender:
    Male
    Occupation:
    Streaming & Building
    Location:
    My computer desk all day
    Would be cool to see that in action, If there's no lag I could see that being a very useful plugin. :)
     
    lAngelP likes this.
  15. lAngelP

    lAngelP Member

    Joined:
    Feb 1, 2016
    Messages:
    76
    Likes Received:
    7
    Trophy Points:
    8
    Gender:
    Male
    Thanks, all my plugins have no lag when released :p Even in my PC runs the server smoothly, and I've done really hard work. You'll see soon a useful feature in this forum. I'm improving it.
     
  16. LowFat

    LowFat Member

    Joined:
    Dec 23, 2015
    Messages:
    387
    Likes Received:
    228
    Trophy Points:
    43
    Gender:
    Male
    Location:
    The Chunk Network
    How often are the checks? Does it account for players who are (almost still) climbing water surrounded by air? Are you checking based on exact location (pitch, yaw) or just xyz? This is interesting, but from what I can imagine there would be quite a few false detections.
     
  17. lAngelP

    lAngelP Member

    Joined:
    Feb 1, 2016
    Messages:
    76
    Likes Received:
    7
    Trophy Points:
    8
    Gender:
    Male
    1) The checks are between 1 second and 5 seconds after the player stopped sending the move packet to the server.
    2) If you are climbing water it won't kill you.
    3) As I designed you don't need to know where the player is looking at.
    4) I designed it to not kill until the plugin is sure the player is glitching.
     
  18. Camezonda

    Camezonda Mod Staff Member Moderator

    Joined:
    Jul 23, 2015
    Messages:
    4,655
    Likes Received:
    946
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    YouTube
    Location:
    Good old place called Essex
    Home Page:
    I like it :)
     
  19. LowFat

    LowFat Member

    Joined:
    Dec 23, 2015
    Messages:
    387
    Likes Received:
    228
    Trophy Points:
    43
    Gender:
    Male
    Location:
    The Chunk Network
    Based on what you said for #1, I assume you'd have to listen on the player move event and set a timer that is only cancelled by another move event?
     
  20. Stefanvld

    Stefanvld Sr. Mod Staff Member Sr. Moderator

    Joined:
    May 24, 2014
    Messages:
    10,690
    Likes Received:
    4,979
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    i do stuff
    Location:
    Behind you.
    If this would work fine, I'm supporting it!