Interface ParticleType
- All Known Subinterfaces:
ParticleTypeColorable,ParticleTypeMotion,ParticleTypeNote,ParticleTypeRedstone
Class used to represent particle type with no additional features.
It provides a non-reflective packet method overloads
to construct particle packet with desired parameters.
All packet methods does not validate parameters in any way.
IMPORTANT NOTE: All methods annotated with Shared annotation
caches and returns exactly one and the same instance with changed state between method calls.
For an independent copy of returned instances, check detachCopy methods on them.
-
Method Summary
Modifier and TypeMethodDescriptionMakes an independent from previously called particle type, copy of this particle type.booleanChecks if this particle is supported by this Spigot version.packet(boolean far, double x, double y, double z) Construct particle packet that will spawn 1 particle at specified position.packet(boolean far, double x, double y, double z, double offsetX, double offsetY, double offsetZ, double speed, int count) Construct particle packet that will spawncountparticles at specified position using provided offset parameters andspeedparameter.packet(boolean far, double x, double y, double z, double offsetX, double offsetY, double offsetZ, int count) Construct particle packet that will spawncountparticles at specified position using provided offset parameters.packet(boolean far, double x, double y, double z, double speed, int count) Construct particle packet that will spawncountparticles at specified position usingspeedparameter.packet(boolean far, double x, double y, double z, int count) Construct particle packet that will spawncountparticles at specified position.packet(boolean far, org.bukkit.Location loc) Construct particle packet that will spawn 1 particle at specified position.packet(boolean far, org.bukkit.Location loc, double offsetX, double offsetY, double offsetZ, double speed, int count) Construct particle packet that will spawncountparticles at specified position using provided offset parameters andspeedparameter.packet(boolean far, org.bukkit.Location loc, double offsetX, double offsetY, double offsetZ, int count) Construct particle packet that will spawncountparticles at specified position using provided offset parameters.packet(boolean far, org.bukkit.Location loc, double speed, int count) Construct particle packet that will spawncountparticles at specified position usingspeedparameter.packet(boolean far, org.bukkit.Location loc, int count) Construct particle packet that will spawncountparticles at specified position.packet(boolean far, org.bukkit.util.Vector loc) Construct particle packet that will spawn 1 particle at specified position.packet(boolean far, org.bukkit.util.Vector loc, double offsetX, double offsetY, double offsetZ, double speed, int count) Construct particle packet that will spawncountparticles at specified position using provided offset parameters andspeedparameter.packet(boolean far, org.bukkit.util.Vector loc, double offsetX, double offsetY, double offsetZ, int count) Construct particle packet that will spawncountparticles at specified position using provided offset parameters.packet(boolean far, org.bukkit.util.Vector loc, double speed, int count) Construct particle packet that will spawncountparticles at specified position usingspeedparameter.packet(boolean far, org.bukkit.util.Vector loc, int count) Construct particle packet that will spawncountparticles at specified position.
-
Method Details
-
detachCopy
ParticleType detachCopy()Makes an independent from previously called particle type, copy of this particle type.
Returned instance can be cached and reused.
- Returns:
- an independent copy of this selected particle type.
-
packet
Construct particle packet that will spawn 1 particle at specified position.
Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aLocationcontaining position.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn 1 particle at specified position.
Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aVectorcontaining position.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn 1 particle at specified position.
Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).x- component of a position.y- component of a position.z- component of a position.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn
countparticles at specified position.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aLocationcontaining position.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn
countparticles at specified position.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aVectorcontaining position.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn
countparticles at specified position.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).x- component of a position.y- component of a position.z- component of a position.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn
countparticles at specified position usingspeedparameter.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aLocationcontaining position.speed- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn
countparticles at specified position usingspeedparameter.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aVectorcontaining position.speed- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
Construct particle packet that will spawn
countparticles at specified position usingspeedparameter.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).x- component of a position.y- component of a position.z- component of a position.speed- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
ParticlePacket packet(boolean far, org.bukkit.Location loc, double offsetX, double offsetY, double offsetZ, int count) Construct particle packet that will spawn
countparticles at specified position using provided offset parameters.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aLocationcontaining position.offsetX- parameter used in various contexts.offsetY- parameter used in various contexts.offsetZ- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
ParticlePacket packet(boolean far, org.bukkit.util.Vector loc, double offsetX, double offsetY, double offsetZ, int count) Construct particle packet that will spawn
countparticles at specified position using provided offset parameters.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aVectorcontaining position.offsetX- parameter used in various contexts.offsetY- parameter used in various contexts.offsetZ- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
ParticlePacket packet(boolean far, double x, double y, double z, double offsetX, double offsetY, double offsetZ, int count) Construct particle packet that will spawn
countparticles at specified position using provided offset parameters.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).x- component of a position.y- component of a position.z- component of a position.offsetX- parameter used in various contexts.offsetY- parameter used in various contexts.offsetZ- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
ParticlePacket packet(boolean far, org.bukkit.Location loc, double offsetX, double offsetY, double offsetZ, double speed, int count) Construct particle packet that will spawn
countparticles at specified position using provided offset parameters andspeedparameter.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aLocationcontaining position.offsetX- parameter used in various contexts.offsetY- parameter used in various contexts.offsetZ- parameter used in various contexts.speed- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
ParticlePacket packet(boolean far, org.bukkit.util.Vector loc, double offsetX, double offsetY, double offsetZ, double speed, int count) Construct particle packet that will spawn
countparticles at specified position using provided offset parameters andspeedparameter.Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).loc- aVectorcontaining position.offsetX- parameter used in various contexts.offsetY- parameter used in various contexts.offsetZ- parameter used in various contexts.speed- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
packet
ParticlePacket packet(boolean far, double x, double y, double z, double offsetX, double offsetY, double offsetZ, double speed, int count) Construct particle packet that will spawn
countparticles at specified position using provided offset parameters andspeedparameter.Parameters are not validated in any way.
This method is overridden by dynamically generated subclasses and depending on implementation this method will look roughly like this:
public Packet packet(boolean far, double x, double y, double z, double offsetX, double offsetY, double offsetZ, double speed, int count) { sharedPacket.setPacket(new PacketPlayOutWorldParticles(parameters...)); return sharedPacket; }It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
far- if true, packets will be rendered much further than 16 blocks (flag is ignored prior to MC 1.8 versions).x- component of a position.y- component of a position.z- component of a position.offsetX- parameter used in various contexts.offsetY- parameter used in various contexts.offsetZ- parameter used in various contexts.speed- parameter used in various contexts.count- amount of particles to spawn.- Returns:
- an NMS
Packetwrapped in sharedParticlePacketobject. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
isPresent
boolean isPresent()Checks if this particle is supported by this Spigot version.
This method is overridden by dynamically generated subclasses.
- Returns:
- true if this particle is supported by this server version, false otherwise.
-