crwdns117691:0crwdne117691:0

crwdns117693:0:javadoc:crwdne117693:0

crwdns117695:0crwdne117695:0

crwdns117697:0crwdne117697: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);

crwdns117699:0:javadoc:crwdnd117699:0:javadoc:crwdne117699:0

crwdns117701:0:javadoc:crwdnd117701:0:javadoc:crwdne117701: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);

crwdns117703:0:javadoc:crwdne117703:0

crwdns117705:0crwdne117705:0

crwdns117707:0crwdne117707: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);

crwdns117709:0:javadoc:crwdne117709:0

crwdns117711:0:javadoc:crwdnd117711:0:javadoc:crwdnd117711:0:javadoc:crwdne117711: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);

crwdns117713:0crwdne117713:0

crwdns117715:0crwdne117715: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();

crwdns117717:0:javadoc:crwdnd117717:0:javadoc:crwdne117717: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);

crwdns117719:0crwdne117719:0