mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Fixed arrow particles when using Redstone particle closes #119
This commit is contained in:
parent
8834210463
commit
9855be1928
@ -2,6 +2,7 @@ package net.Indyuce.mmoitems.api;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.Particle.DustOptions;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
@ -42,6 +43,9 @@ public class ArrowParticles extends BukkitRunnable {
|
||||
}
|
||||
|
||||
if (color != null)
|
||||
if (particle.getDataType() == DustOptions.class)
|
||||
arrow.getWorld().spawnParticle(particle, arrow.getLocation().add(0, .25, 0), amount, offset, offset, offset, new Particle.DustOptions(color, 1));
|
||||
else
|
||||
arrow.getWorld().spawnParticle(particle, arrow.getLocation().add(0, .25, 0), amount, offset, offset, offset, color);
|
||||
else
|
||||
arrow.getWorld().spawnParticle(particle, arrow.getLocation().add(0, .25, 0), amount, offset, offset, offset, speed);
|
||||
|
Loading…
Reference in New Issue
Block a user