πŸ”₯
Sparkle
  • πŸ‘‹Welcome to Sparkle!
  • πŸ”©Installation
  • πŸ—ƒοΈGeneral Information
    • πŸ–₯️For server owners
    • πŸ‘¨β€πŸ’»For developers
  • βš™οΈApps
    • πŸ“±Apps
    • 🚞Components
    • πŸ“¦Services
  • πŸ•ΉοΈInterchange
    • πŸ–¨οΈInterchanges
    • πŸ”©InterchangeStructure
    • 🧫CompletionAsset
    • πŸ—»StructuredInterchange
  • πŸ–₯️User Experience
    • πŸ“¨Transmission
    • πŸ—³οΈItems
    • 🎨Canvas
    • πŸ§‘β€πŸš€Effects
      • ⛓️Types
      • πŸ—―οΈParticleEffect
      • πŸ”ŠSoundEffect
  • πŸ—ΊοΈWorld
    • πŸ–οΈDyeableMaterial
    • 🌈ColorType
    • πŸ™οΈShapes
  • ⏱️Timing
    • πŸ›£οΈCoroutines
    • ⏳Scheduling & Deferral
  • βš—οΈOther
    • 🧬Debug
    • 🏜️SandBox
Powered by GitBook
On this page
  • The ParticleData
  • An example

Was this helpful?

  1. User Experience
  2. Effects

ParticleEffect

Use particles

The ParticleData

The particle effect is mainly used by the ParticleData object, which is based on the paper ParticleBuilder API.

So you can use the ParticleEffect, by creating a new ParticleData. You can use the ParticleData like a ParticleBuilder, but to display the particle, you should use the play(...) function instead.

The additional positive effect, of using the ParticleData instead of the normal ParticleBuilder is, that the type of data is respected, instead of thrown away. This prevents errors and confusion.

Use the putData(...) function, to limit the input to the requested type of the particle, so no issues will appear during the data use!

An example

ParticleData(ParticleType.BLOCK_MARKER)
   .putData(Material.BARREL.createBlockData())
   .count(20)
   .offset(10)
   .extra(.0)
   .playParticleEffect(10)
PreviousTypesNextSoundEffect

Last updated 2 years ago

Was this helpful?

πŸ–₯️
πŸ§‘β€πŸš€
πŸ—―οΈ