Class ParticleSpawner

java.lang.Object
dev.esophose.playerparticles.particles.spawning.ParticleSpawner
Direct Known Subclasses:
ReflectiveParticleSpawner, SpigotParticleSpawner

public abstract class ParticleSpawner
extends java.lang.Object
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  ParticleSpawner.ParticleColorException
    Represents a runtime exception that is thrown either if the displayed particle effect is not colorable or if the particle color type is incorrect
    static class  ParticleSpawner.ParticleDataException
    Represents a runtime exception that is thrown either if the displayed particle effect requires data and has none or vice-versa or if the data type is incorrect
  • Constructor Summary

    Constructors 
    Constructor Description
    ParticleSpawner()  
  • Method Summary

    Modifier and Type Method Description
    static boolean canSee​(org.bukkit.entity.Player player, org.bukkit.entity.Player target)
    Checks if a player can see another player
    abstract void display​(ParticleEffect particleEffect, double offsetX, double offsetY, double offsetZ, double speed, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
    Displays a particle effect
    abstract void display​(ParticleEffect particleEffect, ColorTransition colorTransition, double offsetX, double offsetY, double offsetZ, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner, float size)
    Displays a particle effect which requires additional data and is only visible for all players within a certain range in the world of @param center
    abstract void display​(ParticleEffect particleEffect, ParticleColor color, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner, float size)
    Displays a single particle which is colored
    abstract void display​(ParticleEffect particleEffect, Vibration vibration, double offsetX, double offsetY, double offsetZ, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
    Displays a particle effect which requires additional data and is only visible for all players within a certain range in the world of @param center
    abstract void display​(ParticleEffect particleEffect, org.bukkit.Material spawnMaterial, double offsetX, double offsetY, double offsetZ, double speed, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
    Displays a particle effect which requires additional data and is only visible for all players within a certain range in the world of @param center
    static java.util.List<org.bukkit.entity.Player> getPlayersInRange​(org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
    Gets a List of Players within the particle display range

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • display

      public abstract void display​(ParticleEffect particleEffect, double offsetX, double offsetY, double offsetZ, double speed, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
      Displays a particle effect
      Parameters:
      particleEffect - The particle type to display
      offsetX - Maximum distance particles can fly away from the center on the x-axis
      offsetY - Maximum distance particles can fly away from the center on the y-axis
      offsetZ - Maximum distance particles can fly away from the center on the z-axis
      speed - Display speed of the particles
      amount - Amount of particles
      center - Center location of the effect
      isLongRange - If the particle can be viewed from long range
      owner - The player that owns the particles
      Throws:
      ParticleSpawner.ParticleDataException - If the particle effect requires additional data
    • display

      public abstract void display​(ParticleEffect particleEffect, ParticleColor color, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner, float size)
      Displays a single particle which is colored
      Parameters:
      particleEffect - The particle type to display
      color - Color of the particle
      center - Center location of the effect
      isLongRange - If the particle can be viewed from long range
      owner - The player that owns the particles
      size - The size of the particle
      Throws:
      ParticleSpawner.ParticleColorException - If the particle effect is not colorable or the color type is incorrect
    • display

      public abstract void display​(ParticleEffect particleEffect, org.bukkit.Material spawnMaterial, double offsetX, double offsetY, double offsetZ, double speed, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
      Displays a particle effect which requires additional data and is only visible for all players within a certain range in the world of @param center
      Parameters:
      particleEffect - The particle type to display
      spawnMaterial - Material of the effect
      offsetX - Maximum distance particles can fly away from the center on the x-axis
      offsetY - Maximum distance particles can fly away from the center on the y-axis
      offsetZ - Maximum distance particles can fly away from the center on the z-axis
      speed - Display speed of the particles
      amount - Amount of particles
      center - Center location of the effect
      isLongRange - If the particle can be viewed from long range
      owner - The player that owns the particles
      Throws:
      ParticleSpawner.ParticleDataException - If the particle effect does not require additional data or if the data type is incorrect
    • display

      public abstract void display​(ParticleEffect particleEffect, ColorTransition colorTransition, double offsetX, double offsetY, double offsetZ, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner, float size)
      Displays a particle effect which requires additional data and is only visible for all players within a certain range in the world of @param center
      Parameters:
      particleEffect - The particle type to display
      colorTransition - Color transition of the effect
      offsetX - Maximum distance particles can fly away from the center on the x-axis
      offsetY - Maximum distance particles can fly away from the center on the y-axis
      offsetZ - Maximum distance particles can fly away from the center on the z-axis
      amount - Amount of particles
      center - Center location of the effect
      isLongRange - If the particle can be viewed from long range
      owner - The player that owns the particles
      size - The size of the particles
      Throws:
      ParticleSpawner.ParticleDataException - If the particle effect does not require additional data or if the data type is incorrect
    • display

      public abstract void display​(ParticleEffect particleEffect, Vibration vibration, double offsetX, double offsetY, double offsetZ, int amount, org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
      Displays a particle effect which requires additional data and is only visible for all players within a certain range in the world of @param center
      Parameters:
      particleEffect - The particle type to display
      vibration - Vibration of the effect
      offsetX - Maximum distance particles can fly away from the center on the x-axis
      offsetY - Maximum distance particles can fly away from the center on the y-axis
      offsetZ - Maximum distance particles can fly away from the center on the z-axis
      amount - Amount of particles
      center - Center location of the effect
      isLongRange - If the particle can be viewed from long range
      owner - The player that owns the particles
      Throws:
      ParticleSpawner.ParticleDataException - If the particle effect does not require additional data or if the data type is incorrect
    • getPlayersInRange

      public static java.util.List<org.bukkit.entity.Player> getPlayersInRange​(org.bukkit.Location center, boolean isLongRange, org.bukkit.entity.Player owner)
      Gets a List of Players within the particle display range
      Parameters:
      center - The center of the radius to check around
      isLongRange - If the particle can be viewed from long range
      owner - The player that owns the particles
      Returns:
      A List of Players within the particle display range
    • canSee

      public static boolean canSee​(org.bukkit.entity.Player player, org.bukkit.entity.Player target)
      Checks if a player can see another player
      Parameters:
      player - The player
      target - The target
      Returns:
      True if player can see target, otherwise false