Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EffortLoadExample implements EffortLoad {
- private Player player;
- private int count;
- public EffortLoadExample(Player player) {
- this.player = player;
- this.count = 0;
- }
- @Override
- public void compute() {
- count++;
- player.sendMessage("Example Task");
- }
- @Override
- public boolean reschedule() {
- return player != null && count <= 4 * 20 && player.isOnline();
- //To active it do this new EffortLoadExample(player).compute();
- // and make sure to activate Effort Load Task as it is a Runnable for this to run
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement