Cancel anti wall hack/walk through walls

Discussion in 'Plugin Development' started by 0ct0berBkkitPlgins, Dec 8, 2015.

Thread Status:
Not open for further replies.
  1. Is there a way to cancel anti wall hacks?

    Basically if you try and walk through a wall you will be moved back by the server. Why I want to cancel this is because in my plugin, I am rendering certain blocks as air to certain players. I want them to be able to walk through these blocks. When the player attempts to walk through, the client basically says "This is air. Nothing is obstructing you. Proceed!", because of the sendBlockChange. But the server says "Hold on, you can't just walk through a tree!" and teleports you back.
     
  2. Offline

    Zombie_Striker

    I assume you mean you want to disable teleporting the players back. In which case, I should tell you that you really shouldn't disable this. But if you really want to, you would have to edit the source file (craftbukkit.jar)and go to the class that controls entities, and add something that checks if the entity can walk through blocks.
     
  3. Offline

    Lordloss

    maybe a PlayerTeleportEvent is fired by this, if so you could cancel it. But i dont really know atm
     
  4. Offline

    mcdorli

    I'm not 100% sure, but I think, player teleport event only gets called, if it need to teleport the player more than 4 blocks away.
     
  5. Offline

    teej107

    I think your only easy hope is to have it the other way around. Have the 'walls' be air on the server but send a block change to the client to show walls. I don't know how smooth this will be.
     
  6. Offline

    RoflFrankoc

    Maybe try checking what the blocks is that he is in and if is air he obvously is not hacking but if it is not air he is hacking.
     
Thread Status:
Not open for further replies.

Share This Page