Advertisement
Guest User

Untitled

a guest
Aug 9th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ArrowRemoval {
  2.  
  3. public ArrowRemoval(){
  4. enable();
  5. }
  6.  
  7. public static PriorityQueue<ArrowLandData> q = new PriorityQueue<ArrowLandData>();
  8.  
  9. public void enable(){
  10. plugin.getInstance().getServer().getScheduler().scheduleSyncRepeatingTask(plugin.getInstance(), new Runnable(){
  11.  
  12. @Override
  13. public void run() {
  14. ArrowLandData a = q.peek();
  15. if(a.getTime() / 1000 >= 10 && a.getArrow().isValid()){
  16. a.getArrow();
  17. q.remove(a);
  18. }
  19.  
  20. }
  21. }, 100L, 100L);
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement