Anti Toggle Sneak

Discussion in 'Spigot Plugin Development' started by Noel_123567, Jan 9, 2020.

  1. Im looking for a anti toggle sneak plugin
     
  2. ??? whats the point of the event being cancellable if it doesn't work?
    If the client just overrode it no matter what the event would not implement Cancellable, have you tried it?
     
  3. It does work, it stops the player from sneaking for one time, and then when the client tries to sneak again, it will stop him again. There is no way that the server could just tell the client "you can't sneak from now on".
     
  4. The only reason you’d want to block ToggleSneak is for cheat prevention purposes. The best way to detect this and punish/warn for it, is to flag them when they are sneaking with a GUI open or interact with a GUI while sneaking. Some other variation of this would be a form of NoSlow detection that would flag when sprinting while sneaking.
     
    • Like Like x 1
  5. That's... quite obvious...
    When people ask, how can I make people unable to hit eachother? They mean how can I prevent it and then after that prevent it again and again and again, not prevent it entirely, the only things I can think of that can be prevented fully is things like Player#setAllowFlight, that's just how the minecraft protocol works and the client server relationship with this sort of game in general...
     
  6. You may be able to use EntityMetadataPackets, but I'm not sure how that would work out.
     
  7. I think the best option is instead of canceling the player from sneaking is to alert online staff, so they can determine whether the player is using toggle sneak or not. :)
     
    • Optimistic Optimistic x 1
  8. In older versions where toggle sneaking wasn't a thing and you couldn't sneak with a GUI open, I would automatically ban players for using it. ;)
     
  9. wait how do you toggle sneak?
     
  10. yea but what buttons do i push?
     
  11. click the link bruh.. it tells you
     
    • Winner Winner x 1