crwdns19180:0crwdne19180:0

crwdns19181:0:javadoc:crwdne19181:0

crwdns19182:0crwdne19182:0

crwdns19183:0crwdne19183: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);

crwdns42587:0:javadoc:crwdnd42587:0:javadoc:crwdne42587:0

crwdns19185:0:javadoc:crwdnd19185:0:javadoc:crwdne19185: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);

crwdns19186:0:javadoc:crwdne19186:0

crwdns19187:0crwdne19187:0

crwdns19188:0crwdne19188:0

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

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

crwdns19189:0:javadoc:crwdne19189:0

crwdns41675:0:javadoc:crwdnd41675:0:javadoc:crwdnd41675:0:javadoc:crwdne41675:0

import org.spongepowered.api.block.BlockTypes;
import org.spongepowered.api.effect.particle.ParticleOptions;

ParticleEffect particle = ParticleEffect.builder()
        .type(ParticleTypes.BLOCK_CRACK)
        .option(ParticleOptions.BLOCK_STATE, BlockTypes.SAND.getDefaultState())
        .build();
viewer.spawnParticles(particle, position);

crwdns41932:0crwdne41932:0

crwdns37196:0crwdne37196: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();

crwdns19193:0:javadoc:crwdnd19193:0:javadoc:crwdne19193: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);

crwdns19194:0crwdne19194:0