Interface ParticleStyle

All Known Implementing Classes:
DefaultParticleStyle, ParticleStyleArrows, ParticleStyleBatman, ParticleStyleBeam, ParticleStyleBlockBreak, ParticleStyleBlockPlace, ParticleStyleCelebration, ParticleStyleChains, ParticleStyleCompanion, ParticleStyleCube, ParticleStyleDeath, ParticleStyleFeet, ParticleStyleFishing, ParticleStyleHalo, ParticleStyleHurt, ParticleStyleIcosphere, ParticleStyleInvocation, ParticleStyleMove, ParticleStyleNormal, ParticleStyleOrbit, ParticleStyleOutline, ParticleStyleOverhead, ParticleStylePoint, ParticleStylePopper, ParticleStylePulse, ParticleStyleQuadhelix, ParticleStyleRings, ParticleStyleSphere, ParticleStyleSpin, ParticleStyleSpiral, ParticleStyleSwords, ParticleStyleTeleport, ParticleStyleThick, ParticleStyleTrail, ParticleStyleTwins, ParticleStyleVortex, ParticleStyleWhirl, ParticleStyleWhirlwind, ParticleStyleWings

public interface ParticleStyle
  • Method Summary

    Modifier and Type Method Description
    boolean canBeFixed()
    Gets if the style can be used in a FixedParticleEffect
    default boolean canToggleWithCombat()
    Gets if the style can be hidden if the player is in combat with the toggle-on-combat setting
    default boolean canToggleWithMovement()
    Gets if the style can be displayed differently based on the toggle-on-move setting when the player is moving
    static ParticleStyle fromInternalName​(java.lang.String styleName)
    Gets the ParticleStyle with the internal name given, returns null if not found
    static ParticleStyle fromName​(java.lang.String styleName)
    Gets the ParticleStyle with the name given, returns null if not found
    default double getFixedEffectOffset()
    The Y-axis offset to be applied when using '/pp fixed create looking'
    default org.bukkit.Material getGuiIconMaterial()  
    java.lang.String getInternalName()  
    default java.lang.String getName()  
    java.util.List<PParticle> getParticles​(ParticlePair particle, org.bukkit.Location location)
    Gets all the particles to display based on the style's logic
    default java.util.List<PParticle> getParticles​(ParticlePair particle, org.bukkit.Location location, org.bukkit.entity.Player player)
    Gets all the particles to display based on the style's logic
    default boolean hasLongRangeVisibility()  
    default boolean isEnabled()  
    void updateTimers()
    Used to update timers for animations, called once per particle tick
  • Method Details

    • getParticles

      java.util.List<PParticle> getParticles​(ParticlePair particle, org.bukkit.Location location)
      Gets all the particles to display based on the style's logic
      Parameters:
      particle - The ParticlePair that contains the particle's data
      location - The central location of the particles
      Returns:
      A List of PParticles to spawn
    • getParticles

      default java.util.List<PParticle> getParticles​(ParticlePair particle, org.bukkit.Location location, org.bukkit.entity.Player player)
      Gets all the particles to display based on the style's logic
      Parameters:
      particle - The ParticlePair that contains the particle's data
      location - The central location of the particles
      player - The player that the particles are spawning on - null for fixed effects
      Returns:
      A List of PParticles to spawn
    • updateTimers

      void updateTimers()
      Used to update timers for animations, called once per particle tick
    • isEnabled

      default boolean isEnabled()
      Returns:
      true if the style is enabled, false otherwise
    • getInternalName

      java.lang.String getInternalName()
      Returns:
      The style's internal name that will always remain constant
    • getName

      default java.lang.String getName()
      Returns:
      The name that the style will display to the users as
    • getGuiIconMaterial

      default org.bukkit.Material getGuiIconMaterial()
      Returns:
      The Material icon that represents this style in the GUI
    • canBeFixed

      boolean canBeFixed()
      Gets if the style can be used in a FixedParticleEffect
      Returns:
      If the style can be used in a FixedParticleEffect
    • canToggleWithMovement

      default boolean canToggleWithMovement()
      Gets if the style can be displayed differently based on the toggle-on-move setting when the player is moving
      Returns:
      True if it can be, otherwise False
    • canToggleWithCombat

      default boolean canToggleWithCombat()
      Gets if the style can be hidden if the player is in combat with the toggle-on-combat setting
      Returns:
      True if it can be, otherwise False
    • getFixedEffectOffset

      default double getFixedEffectOffset()
      The Y-axis offset to be applied when using '/pp fixed create looking'
      Returns:
      How far to move the style up or down to get it centered on the block properly
    • hasLongRangeVisibility

      default boolean hasLongRangeVisibility()
      Returns:
      true if the particle should be seen from the fixed effect distance instead of the player distance, or false otherwise
    • fromName

      static ParticleStyle fromName​(java.lang.String styleName)
      Gets the ParticleStyle with the name given, returns null if not found
      Parameters:
      styleName - The name of the style to search for
      Returns:
      The ParticleStyle with a matching name
    • fromInternalName

      static ParticleStyle fromInternalName​(java.lang.String styleName)
      Gets the ParticleStyle with the internal name given, returns null if not found
      Parameters:
      styleName - The internal name of the style to search for
      Returns:
      The ParticleStyle with a matching name