crwdns39051:0crwdne39051:0

crwdns39052:0:javadoc:crwdne39052:0

crwdns39053:0crwdne39053:0

crwdns39054:0crwdne39054: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);

crwdns39055:0:javadoc:crwdnd39055:0:javadoc:crwdne39055:0

crwdns39056:0:javadoc:crwdnd39056:0:javadoc:crwdne39056: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);

crwdns39057:0:javadoc:crwdne39057:0

crwdns39058:0crwdne39058:0

crwdns39059:0crwdne39059: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);

crwdns39060:0:javadoc:crwdne39060:0

crwdns39061:0:javadoc:crwdnd39061:0:javadoc:crwdnd39061:0:javadoc:crwdne39061: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);

crwdns39062:0crwdne39062:0

crwdns39063:0crwdne39063: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();

crwdns39064:0:javadoc:crwdnd39064:0:javadoc:crwdne39064: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);

crwdns39065:0crwdne39065:0