When sneaking it charges up?

Discussion in 'Plugin Development' started by CoderRevolq, Apr 10, 2014.

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

    CoderRevolq

    How do i make it so when I sneak it charges up my ability and after " x " amount of seconds the player performs an action, can anyone help? An example of this is the Dwarf kit from McPvP's HG, Search it up. Thanks if you can help!
     
  2. Offline

    Glumpz

    On PlayerToggleSneakEvent start a repeating task that adds 1 to a counter every 1 second if the player is still sneaking. If the player ever stops sneaking just cancel the rest of the code and the task. When you are finished with whatever you need the player to do make sure to cancel any remaining tasks.
     
Thread Status:
Not open for further replies.

Share This Page