add in Player.java
"public long FarmDelay;"
then in your farmin click code
add this
Code:if (System.currentTimeMillis() - c.FarmDelay > 1000){ Your click code here c.FarmDelay = System.currentTimeMillis(); }
|
So im adding farming to my server but people can fast spawn click the herb to get fast inventorys of them so how do i add a timer?
So they only can pick one herb every second? thanks
add in Player.java
"public long FarmDelay;"
then in your farmin click code
add this
Code:if (System.currentTimeMillis() - c.FarmDelay > 1000){ Your click code here c.FarmDelay = System.currentTimeMillis(); }
This works thanks for the fast help ,fixed.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |