|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quartercode.quarterbukkit.api.particle.ParticleSystem
public class ParticleSystem
This class represents a complex particle system using firework particles. The system can also get customized with sutom renderers and spawners. All parameters can be changed in real time between to runs.
Constructor Summary | |
---|---|
ParticleSystem()
Creates a new empty particle system. |
|
ParticleSystem(java.util.List<ParticleDescription> descriptions)
Creates a new particle system and sets the ParticleDescription s as a List . |
|
ParticleSystem(org.bukkit.Location location)
Creates a new particle system and sets the start Location . |
|
ParticleSystem(org.bukkit.Location location,
java.util.List<ParticleDescription> descriptions)
Creates a new particle system and sets the start Location and the ParticleDescription s as a List . |
|
ParticleSystem(org.bukkit.Location location,
ParticleDescription... descriptions)
Creates a new particle system and sets the start Location and the ParticleDescription s as an array/vararg. |
|
ParticleSystem(ParticleDescription... descriptions)
Creates a new particle system and sets the ParticleDescription s as an array/vararg. |
Method Summary | |
---|---|
ParticleSystem |
addDescription(ParticleDescription description)
Adds a ParticleDescription . |
protected void |
end(org.bukkit.plugin.Plugin plugin,
org.bukkit.Location location)
Gets called when the animation ends. |
protected void |
execute(org.bukkit.plugin.Plugin plugin,
org.bukkit.Location location)
Executes the particle animation; may override in subclass for more customization. |
org.bukkit.util.Vector |
getAnimation()
Returns the movement direction of the spawner as a Vector . |
java.util.List<ParticleDescription> |
getDescriptions()
Returns the ParticleDescription s. |
org.bukkit.Location |
getLocation()
Returns the start Location . |
int |
getRate()
Returns the delay between two runs. |
int |
getRuns()
Returns the count of runs the particle system should emit particles. |
ParticleSpawner |
getSpawner()
Returns the ParticleSpawner (default DefaultParticleSpawner ). |
boolean |
isRunning()
Returns if the particle system is running. |
ParticleSystem |
removeDescription(ParticleDescription description)
Removes a ParticleDescription . |
ParticleSystem |
setAnimation(org.bukkit.util.Vector animation)
Sets the movement direction of the spawner as a Vector . |
ParticleSystem |
setDescriptions(java.util.List<ParticleDescription> descriptions)
Sets the ParticleDescription s as a List . |
ParticleSystem |
setDescriptions(ParticleDescription... descriptions)
Sets the ParticleDescription s as an array/vararg. |
ParticleSystem |
setLocation(org.bukkit.Location location)
Sets the start Location . |
ParticleSystem |
setRate(int rate)
Sets the delay between two runs. |
ParticleSystem |
setRuns(int runs)
Sets the count of runs the particle system should emit particles. |
ParticleSystem |
setSpawner(ParticleSpawner spawner)
Sets the ParticleSpawner . |
ParticleSystem |
start(org.bukkit.plugin.Plugin plugin)
Starts the animation and stops the current one if there's already one running. |
ParticleSystem |
stop()
Stops the animation if it's running. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParticleSystem()
public ParticleSystem(org.bukkit.Location location)
Location
.
location
- The start Location
.public ParticleSystem(ParticleDescription... descriptions)
ParticleDescription
s as an array/vararg.
descriptions
- The ParticleDescription
s as an array/vararg.public ParticleSystem(java.util.List<ParticleDescription> descriptions)
ParticleDescription
s as a List
.
descriptions
- The ParticleDescription
s as a List
.public ParticleSystem(org.bukkit.Location location, ParticleDescription... descriptions)
Location
and the ParticleDescription
s as an array/vararg.
location
- The start Location
.descriptions
- The ParticleDescription
s as an array/vararg.public ParticleSystem(org.bukkit.Location location, java.util.List<ParticleDescription> descriptions)
Location
and the ParticleDescription
s as a List
.
location
- The start Location
.descriptions
- The ParticleDescription
s as a List
.Method Detail |
---|
public java.util.List<ParticleDescription> getDescriptions()
ParticleDescription
s.
ParticleDescription
s.public ParticleSystem setDescriptions(ParticleDescription... descriptions)
ParticleDescription
s as an array/vararg.
descriptions
- The ParticleDescription
s as an array/vararg.
public ParticleSystem setDescriptions(java.util.List<ParticleDescription> descriptions)
ParticleDescription
s as a List
.
descriptions
- The ParticleDescription
s as a List
.
public ParticleSystem addDescription(ParticleDescription description)
ParticleDescription
.
description
- The ParticleDescription
to add.
public ParticleSystem removeDescription(ParticleDescription description)
ParticleDescription
.
description
- The ParticleDescription
to remove.
public org.bukkit.Location getLocation()
Location
.
Location
.public ParticleSystem setLocation(org.bukkit.Location location)
Location
.
location
- The start Location
.
public int getRuns()
public ParticleSystem setRuns(int runs)
runs
- The count of runs the particle system should emit particles. Set to -1 for endless runs.
public int getRate()
public ParticleSystem setRate(int rate)
rate
- The delay between two runs.
public org.bukkit.util.Vector getAnimation()
Vector
.
Vector
.public ParticleSystem setAnimation(org.bukkit.util.Vector animation)
Vector
.
animation
- The movement direction of the spawner as a Vector
.
public ParticleSpawner getSpawner()
ParticleSpawner
(default DefaultParticleSpawner
).
ParticleSpawner
.public ParticleSystem setSpawner(ParticleSpawner spawner)
ParticleSpawner
.
spawner
- The ParticleSpawner
.
public boolean isRunning()
public ParticleSystem start(org.bukkit.plugin.Plugin plugin)
plugin
- The Plugin
to bind the ScheduleTask
and exception-handling on.
public ParticleSystem stop()
protected void execute(org.bukkit.plugin.Plugin plugin, org.bukkit.Location location)
plugin
- The Plugin
to bind the ScheduleTask
and exception-handling on.location
- The current particle source.protected void end(org.bukkit.plugin.Plugin plugin, org.bukkit.Location location)
plugin
- The Plugin
to bind the ScheduleTask
and exception-handling on.location
- The current particle source.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |