crwdns128671:0crwdne128671:0

crwdns128673:0:javadoc:crwdne128673:0

crwdns128675:0crwdne128675:0

crwdns128677:0crwdne128677:0

import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.sound.SoundTypes;

import com.flowpowered.math.vector.Vector3d;

viewer.playSound(SoundTypes.ENTITY_CREEPER_PRIMED, new Vector3d(1, 65, 1), 1);

crwdns128679:0:javadoc:crwdnd128679:0:javadoc:crwdne128679:0

crwdns128681:0:javadoc:crwdnd128681:0:javadoc:crwdne128681:0

import org.spongepowered.api.effect.sound.PitchModulation;
import org.spongepowered.api.effect.sound.SoundCategories;

viewer.playSound(SoundTypes.ENTITY_CREEPER_PRIMED, SoundCategories.HOSTILE,
    new Vector3d(1, 65, 1), 1, PitchModulation.AFLAT0);

crwdns128683:0:javadoc:crwdne128683:0

crwdns128685:0crwdne128685:0

crwdns128687:0crwdne128687:0

import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleTypes;

ParticleEffect effect = ParticleEffect.builder()
    .type(ParticleTypes.LAVA).count(50).build();
viewer.spawnParticles(effect, position);

crwdns128689:0:javadoc:crwdne128689:0

crwdns128691:0:javadoc:crwdnd128691:0:javadoc:crwdnd128691:0:javadoc:crwdne128691:0

import org.spongepowered.api.effect.particle.BlockParticle;

BlockParticle blockParticle = BlockParticle.builder()
    .type(ParticleTypes.BLOCK_CRACK).block(BlockTypes.SAND.getDefaultState()).build();
viewer.spawnParticles(blockParticle, position);

crwdns128693:0crwdne128693:0

crwdns128695:0crwdne128695:0

import org.spongepowered.api.effect.potion.PotionEffect;
import org.spongepowered.api.effect.potion.PotionEffectTypes;

PotionEffect potion = PotionEffect.builder().potionType(PotionEffectTypes.HASTE)
    .duration(10).amplifier(5).build();

crwdns128697:0:javadoc:crwdnd128697:0:javadoc:crwdne128697:0

import org.spongepowered.api.data.manipulator.mutable.PotionEffectData;
import org.spongepowered.api.entity.living.player.Player;

PotionEffectData effects = player.getOrCreate(PotionEffectData.class).get();
effects.addElement(potion);
player.offer(effects);

crwdns128699:0crwdne128699:0