crwdns147897:0crwdne147897:0

crwdns147899:0:javadoc:crwdne147899:0

crwdns147901:0crwdne147901:0

crwdns147903:0crwdne147903: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);

crwdns147905:0:javadoc:crwdnd147905:0:javadoc:crwdne147905:0

crwdns147907:0:javadoc:crwdnd147907:0:javadoc:crwdne147907: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);

crwdns147909:0:javadoc:crwdne147909:0

crwdns147911:0crwdne147911:0

crwdns147913:0crwdne147913: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);

crwdns147915:0:javadoc:crwdne147915:0

crwdns147917:0:javadoc:crwdnd147917:0:javadoc:crwdnd147917:0:javadoc:crwdne147917: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);

crwdns147919:0crwdne147919:0

crwdns147921:0crwdne147921: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();

crwdns147923:0:javadoc:crwdnd147923:0:javadoc:crwdne147923: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);

crwdns147925:0crwdne147925:0