public class ParticleEffectData extends PersistenceObject implements com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta, org.bukkit.configuration.serialization.ConfigurationSerializable
Do not remove this header!
Version 1.0
MIT License
Copyright (c) 2016
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Constructor and Description |
|---|
ParticleEffectData()
Initializes a new ParticleEffectData
|
ParticleEffectData(Map<String,Object> items)
Parses the potioneffect out of the map
|
ParticleEffectData(String effectName,
int amount,
double speed,
double offsetX,
double offsetY,
double offsetZ)
Initializes a new ParticleEffectData with the given params
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Object location)
Plays the effect at the given location to the given players.
|
void |
apply(Object location,
Collection<Object> players)
Plays the effect at the given location to the given players.
|
void |
applyTo(org.bukkit.Location location,
org.bukkit.entity.Player... players)
Plays the effect at the given location to the given players.
|
ParticleEffectData |
clone()
Copies the current builder
|
boolean |
equals(Object o)
Checks if 2 builders are equal
|
int |
getAmount()
Returns the amount of particles of the particleEffect
|
int |
getBlue()
Returns the RGB color blue of the particleEffect
|
Byte |
getData()
Returns the data of the particleEffect
|
String |
getEffectName()
Returns the effect of the particleEffect
|
com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleEffectType |
getEffectType()
Returns the particleEffectType of the particleEffect
|
int |
getGreen()
Returns the RGB color green of the particleEffect
|
Object |
getMaterial()
Returns the material of the particleEffect
|
double |
getOffsetX()
Returns the offsetX of the particleEffect
|
double |
getOffsetY()
Returns the offsetY of the particleEffect
|
double |
getOffsetZ()
Returns the offsetZ of the particleEffect
|
static com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleEffectType |
getParticleEffectFromName(String name)
Returns the particleEffectType from name
|
static String |
getParticlesText()
Returns a text of all particleEffects to let the user easily view them
|
int |
getRed()
Returns the RGB color red of the particleEffect
|
double |
getSpeed()
Returns the speed of the particleEffect
|
boolean |
isColorParticleEffect()
Returns if the particleEffect is a color particleEffect
|
boolean |
isMaterialParticleEffect()
Returns if the particleEffect is a materialParticleEffect
|
boolean |
isNoteParticleEffect()
Returns if the particleEffect is a note particleEffect
|
Map<String,Object> |
serialize()
Serializes the particleEffect data to be stored to the filesystem
|
ParticleEffectData |
setAmount(int amount)
Sets the amount of particles of the particleEffect
|
ParticleEffectData |
setBlue(int blue)
Sets the blue of the RGB color
|
ParticleEffectData |
setColor(int red,
int green,
int blue)
Sets the RGB colors of the particleEffect
|
ParticleEffectData |
setColor(com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleColor particleColor)
Sets the color of the particleEffect
|
ParticleEffectData |
setData(Byte data)
Sets the data of the material of the particleEffect
|
ParticleEffectData |
setEffectName(String name)
Sets the effectType of the particleEffect
|
ParticleEffectData |
setEffectType(com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleEffectType type)
Sets the effectType of the particlEffect
|
ParticleEffectData |
setGreen(int green)
Sets the green of the RGB color
|
ParticleEffectData |
setMaterial(Object material)
Sets the material of the particleEffect
|
ParticleEffectData |
setNoteColor(int color)
Sets the color for note particleEffect
|
ParticleEffectData |
setOffset(double offsetX,
double offsetY,
double offsetZ)
Sets the offset of the particleEffect
|
ParticleEffectData |
setOffsetX(double offsetX)
Sets the offsetX of the particleEffect
|
ParticleEffectData |
setOffsetY(double offsetY)
Sets the offsetY of the particleEffect
|
ParticleEffectData |
setOffsetZ(double offsetZ)
Sets the offsetZ of the particleEffect
|
ParticleEffectData |
setRed(int red)
Sets the red of the RGB color
|
ParticleEffectData |
setSpeed(double speed)
Sets the speed of the particleEffect
|
<T extends Enum<T>> |
toParticle(Class<?> clazz)
Converts the effect to a bukkitParticle
|
String |
toString()
Displays the builder as string
|
getId, setIdpublic ParticleEffectData()
public ParticleEffectData(String effectName, int amount, double speed, double offsetX, double offsetY, double offsetZ)
effectName - effectamount - amountspeed - speedoffsetX - xoffsetY - yoffsetZ - zpublic ParticleEffectData setColor(int red, int green, int blue)
setColor in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetared - redgreen - greenblue - bluepublic ParticleEffectData setColor(com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleColor particleColor)
setColor in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaparticleColor - particleColorpublic ParticleEffectData setNoteColor(int color)
setNoteColor in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetacolor - colorpublic ParticleEffectData setAmount(int amount)
setAmount in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaamount - amountpublic ParticleEffectData setSpeed(double speed)
setSpeed in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaspeed - speedpublic ParticleEffectData setOffsetX(double offsetX)
setOffsetX in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaoffsetX - offsetXpublic ParticleEffectData setOffsetY(double offsetY)
setOffsetY in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaoffsetY - offsetYpublic ParticleEffectData setOffsetZ(double offsetZ)
setOffsetZ in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaoffsetZ - offsetZpublic ParticleEffectData setOffset(double offsetX, double offsetY, double offsetZ)
setOffset in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaoffsetX - offsetXoffsetY - offsetYoffsetZ - offsetZpublic ParticleEffectData setEffectName(String name)
setEffectName in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetaname - namepublic ParticleEffectData setEffectType(com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleEffectType type)
setEffectType in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetatype - typepublic ParticleEffectData setBlue(int blue)
setBlue in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetablue - bluepublic ParticleEffectData setRed(int red)
setRed in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetared - redpublic ParticleEffectData setGreen(int green)
setGreen in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetagreen - greenpublic ParticleEffectData setMaterial(Object material)
setMaterial in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetamaterial - materialpublic ParticleEffectData setData(Byte data)
setData in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetadata - datapublic String getEffectName()
getEffectName in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleEffectType getEffectType()
getEffectType in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic int getAmount()
getAmount in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic double getSpeed()
getSpeed in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic double getOffsetX()
getOffsetX in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic double getOffsetY()
getOffsetY in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic double getOffsetZ()
getOffsetZ in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic int getBlue()
getBlue in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic int getRed()
getRed in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic int getGreen()
getGreen in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic Object getMaterial()
getMaterial in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic Byte getData()
getData in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic ParticleEffectData clone()
public <T extends Enum<T>> T toParticle(Class<?> clazz)
T - Particleclazz - Clazz to be given for compatibilitypublic boolean isColorParticleEffect()
isColorParticleEffect in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic boolean isNoteParticleEffect()
isNoteParticleEffect in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic boolean isMaterialParticleEffect()
isMaterialParticleEffect in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetapublic void apply(Object location, Collection<Object> players)
apply in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetalocation - locationplayers - playerspublic void apply(Object location)
apply in interface com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMetalocation - locationpublic void applyTo(org.bukkit.Location location,
org.bukkit.entity.Player... players)
location - locationplayers - playerspublic boolean equals(Object o)
public String toString()
public Map<String,Object> serialize()
serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializablepublic static String getParticlesText()
public static com.github.shynixn.petblocks.api.persistence.entity.ParticleEffectMeta.ParticleEffectType getParticleEffectFromName(String name)
name - nameCopyright © 2017. All rights reserved.