public static final class ParticleEffect.ParticleEffectPacket
extends java.lang.Object
This class is part of the ParticleEffect Library and follows the same usage conditions
| Constructor and Description |
|---|
ParticleEffect.ParticleEffectPacket(java.lang.String name,
float offsetX,
float offsetY,
float offsetZ,
float speed,
int amount)
Construct a new particle effect packet
|
| Modifier and Type | Method and Description |
|---|---|
static void |
initialize()
Initializes
packetConstructor, getHandle, playerConnection and sendPacket and sets initialized to true if it succeeds
Note: These fields only have to be initialized once, so it will return if initialized is already set to true |
static boolean |
isInitialized()
|
void |
sendTo(org.bukkit.Location center,
double range)
Sends the packet to all players in a certain range
|
void |
sendTo(org.bukkit.Location center,
java.util.List<org.bukkit.entity.Player> players)
Sends the packet to all players in the list
|
void |
sendTo(org.bukkit.Location center,
org.bukkit.entity.Player player)
Sends the packet to a single player and caches it
|
public ParticleEffect.ParticleEffectPacket(java.lang.String name,
float offsetX,
float offsetY,
float offsetZ,
float speed,
int amount)
throws java.lang.IllegalArgumentException
name - Name of the effectoffsetX - Maximum distance particles can fly away from the center on the x-axisoffsetY - Maximum distance particles can fly away from the center on the y-axisoffsetZ - Maximum distance particles can fly away from the center on the z-axisspeed - Display speed of the particlesamount - Amount of particlesjava.lang.IllegalArgumentException - If the speed is lower than 0 or the amount is lower than 1initialize()public static void initialize()
throws fr.unreal852.UnrealAPI.ParticleEffects.ParticleEffect.ParticleEffectPacket.VersionIncompatibleException
packetConstructor, getHandle, playerConnection and sendPacket and sets initialized to true if it succeeds
Note: These fields only have to be initialized once, so it will return if initialized is already set to true
VersionIncompatibleException - if accessed packets, fields or methods differ in your bukkit versionfr.unreal852.UnrealAPI.ParticleEffects.ParticleEffect.ParticleEffectPacket.VersionIncompatibleExceptionpublic static boolean isInitialized()
initialize()public void sendTo(org.bukkit.Location center,
org.bukkit.entity.Player player)
throws fr.unreal852.UnrealAPI.ParticleEffects.ParticleEffect.ParticleEffectPacket.PacketInstantiationException,
fr.unreal852.UnrealAPI.ParticleEffects.ParticleEffect.ParticleEffectPacket.PacketSendingException
center - Center location of the effectplayer - Receiver of the packetPacketInstantiationException - if instantion fails due to an unknown errorPacketSendingException - if sending fails due to an unknown errorfr.unreal852.UnrealAPI.ParticleEffects.ParticleEffect.ParticleEffectPacket.PacketInstantiationExceptionfr.unreal852.UnrealAPI.ParticleEffects.ParticleEffect.ParticleEffectPacket.PacketSendingExceptionpublic void sendTo(org.bukkit.Location center,
java.util.List<org.bukkit.entity.Player> players)
throws java.lang.IllegalArgumentException
center - Center location of the effectplayers - Receivers of the packetjava.lang.IllegalArgumentException - If the player list is emptysendTo(Location center, Player player)public void sendTo(org.bukkit.Location center,
double range)
throws java.lang.IllegalArgumentException
center - Center location of the effectrange - Range in which players will receive the packet (Maximum range for particles is usually 16, but it can differ for some types)java.lang.IllegalArgumentException - If the range is lower than 1sendTo(Location center, Player player)