crwdns137251:0crwdne137251:0
Warning
crwdns137253:0crwdne137253:0
crwdns137255:0:javadoc:crwdne137255:0
crwdns137257:0crwdne137257:0
crwdns137259:0crwdne137259: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);
crwdns137261:0:javadoc:crwdnd137261:0:javadoc:crwdne137261:0
crwdns137263:0:javadoc:crwdnd137263:0:javadoc:crwdne137263: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);
crwdns137265:0:javadoc:crwdne137265:0
crwdns137267:0crwdne137267:0
crwdns137269:0crwdne137269: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);
crwdns137271:0:javadoc:crwdne137271:0
crwdns137273:0:javadoc:crwdnd137273:0:javadoc:crwdnd137273:0:javadoc:crwdne137273: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);
crwdns137275:0crwdne137275:0
crwdns137277:0crwdne137277: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();
crwdns137279:0:javadoc:crwdnd137279:0:javadoc:crwdne137279: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);
crwdns137281:0crwdne137281:0