Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. trail(projectile, loc -> {
  2. World world1 = loc.getWorld();
  3. world1.spawnParticle(Particle.SPELL_WITCH, loc, 10, 0.5, 0.5, 0.5, 0.05, null, true);
  4. world1.spawnParticle(Particle.ENCHANTMENT_TABLE, loc, 10, 0.5, 0.5, 0.5, 0.15, null, true);
  5. });
  6.  
  7. private void trail(Entity entity, Consumer<Location> consumer) {
  8. BukkitRunnable bukkitRunnable = new BukkitRunnable() {
  9. @Override
  10. public void run() {
  11. if (entity.isValid()) {
  12. consumer.accept(entity.getLocation());
  13. } else cancel();
  14. }
  15. };
  16. Common.runTaskTimer(bukkitRunnable, 1, 1);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement