Advertisement
Guest User

Untitled

a guest
Apr 30th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. new BukkitRunnable() {
  2. int i = 0;
  3. List<Location> locations = circle(p, p.getLocation(), 7, 1, true, false, 3);
  4. Location middle = p.getLocation();
  5. @Override
  6. public void run() {
  7. if (i > locations.size()) {
  8. for (LivingEntity en : middle.getWorld()
  9. .getEntitiesByClass(LivingEntity.class)) {
  10. if (en.getLocation().distance(loc) <= 6) {
  11. if(!en.equals(p)) {
  12. en.damage(4.0f);
  13. ParticleEffect.LARGE_SMOKE.display(en.getLocation(), 0.2f, 0.4f, 0.2f, 0.1f, 25);
  14. ParticleEffect.HAPPY_VILLAGER.display(en.getLocation(), 0.1f, 0.2f, 0.1f, 0.1f, 25);
  15.  
  16. }
  17. }
  18. }
  19. cancel();
  20. }
  21. ParticleEffect.LARGE_SMOKE.display(locations.get(i), 0.2f, 0.2f, 0.2f, 0.1f, 35);
  22. ParticleEffect.HAPPY_VILLAGER.display(locations.get(i), 0.2f, 0.2f, 0.2f, 1, 35);
  23. i++;
  24. }
  25. }.runTaskTimer(main, 8L, 5L);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement