use of com.laytonsmith.abstraction.enums.MCParticle in project CommandHelper by EngineHub.
the class BukkitMCPlayer method spawnParticle.
@Override
public void spawnParticle(MCLocation l, MCParticle pa, int count, double offsetX, double offsetY, double offsetZ, double velocity, Object data) {
try {
Particle type = Particle.valueOf(pa.name());
Location loc = ((BukkitMCLocation) l).asLocation();
if (data != null && type.getDataType().equals(ItemStack.class) && data instanceof MCItemStack) {
p.spawnParticle(type, loc, count, offsetX, offsetY, offsetZ, velocity, ((MCItemStack) data).getHandle());
} else {
p.spawnParticle(type, loc, count, offsetX, offsetY, offsetZ, velocity);
}
} catch (NoClassDefFoundError ex) {
// probably prior to 1.9
}
}
Aggregations