Package org.bukkit
Class FireworkEffect
java.lang.Object
org.bukkit.FireworkEffect
- All Implemented Interfaces:
ConfigurationSerializable
Represents a single firework effect.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This is a builder for FireworkEffects.static class
The type or shape of the effect. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull FireworkEffect.Builder
builder()
Construct a firework effect.deserialize(@NotNull Map<String,Object> map)
boolean
Get the primary colors of the firework effect.Get the fade colors of the firework effect.getType()
Get the type of the firework effect.boolean
Get whether the firework effect flickers.int
hashCode()
boolean
hasTrail()
Get whether the firework effect has a trail.Creates a Map representation of this class.toString()
-
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
@NotNull public static @NotNull ConfigurationSerializable deserialize(@NotNull @NotNull Map<String,Object> map)- Parameters:
map
- the map to deserialize- Returns:
- the resulting serializable
- See Also:
ConfigurationSerializable
-
serialize
Description copied from interface:ConfigurationSerializable
Creates a Map representation of this class.This class must provide a method to restore this class, as defined in the
ConfigurationSerializable
interface javadocs.- Specified by:
serialize
in interfaceConfigurationSerializable
- Returns:
- Map containing the current state of this class
-
toString
-
hashCode
public int hashCode() -
equals
-