Advertisement
Guest User

Untitled

a guest
Sep 6th, 2021
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. public class EffortLoadExample implements EffortLoad {
  2.  
  3.     private Player player;
  4.     private int count;
  5.  
  6.     public EffortLoadExample(Player player) {
  7.         this.player = player;
  8.         this.count = 0;
  9.     }
  10.  
  11.     @Override
  12.     public void compute() {
  13.         count++;
  14.         player.sendMessage("Example Task");
  15.     }
  16.  
  17.     @Override
  18.     public boolean reschedule() {
  19.         return player != null && count <= 4 * 20 && player.isOnline();
  20.        //To active it do this  new EffortLoadExample(player).compute();
  21.         // and make sure to activate Effort Load Task as it is a Runnable for this to run
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement