Package org.bukkit
Class FireworkEffect
java.lang.Object
org.bukkit.FireworkEffect
- All Implemented Interfaces:
ConfigurationSerializable
public final class FireworkEffect extends java.lang.Object implements ConfigurationSerializable
Represents a single firework effect.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFireworkEffect.BuilderThis is a builder for FireworkEffects.static classFireworkEffect.TypeThe type or shape of the effect. -
Method Summary
Modifier and Type Method Description static FireworkEffect.Builderbuilder()Construct a firework effect.static ConfigurationSerializabledeserialize(java.util.Map<java.lang.String,java.lang.Object> map)booleanequals(java.lang.Object obj)java.util.List<Color>getColors()Get the primary colors of the firework effect.java.util.List<Color>getFadeColors()Get the fade colors of the firework effect.FireworkEffect.TypegetType()Get the type of the firework effect.booleanhasFlicker()Get whether the firework effect flickers.inthashCode()booleanhasTrail()Get whether the firework effect has a trail.java.util.Map<java.lang.String,java.lang.Object>serialize()Creates a Map representation of this class.java.lang.StringtoString()
-
Method Details
-
builder
Construct a firework effect.- Returns:
- A utility object for building a firework effect
-
hasFlicker
public boolean hasFlicker()Get whether the firework effect flickers.- Returns:
- true if it flickers, false if not
-
hasTrail
public boolean hasTrail()Get whether the firework effect has a trail.- Returns:
- true if it has a trail, false if not
-
getColors
Get the primary colors of the firework effect.- Returns:
- An immutable list of the primary colors
-
getFadeColors
Get the fade colors of the firework effect.- Returns:
- An immutable list of the fade colors
-
getType
Get the type of the firework effect.- Returns:
- The effect type
-
deserialize
public static ConfigurationSerializable deserialize(java.util.Map<java.lang.String,java.lang.Object> map)- Parameters:
map- the map to deserialize- Returns:
- the resulting serializable
- See Also:
ConfigurationSerializable
-
serialize
public java.util.Map<java.lang.String,java.lang.Object> serialize()Description copied from interface:ConfigurationSerializableCreates a Map representation of this class.This class must provide a method to restore this class, as defined in the
ConfigurationSerializableinterface javadocs.- Specified by:
serializein interfaceConfigurationSerializable- Returns:
- Map containing the current state of this class
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-