org.bukkit
Class FireworkEffect

java.lang.Object
  extended by org.bukkit.FireworkEffect
All Implemented Interfaces:
ConfigurationSerializable

public final class FireworkEffect
extends Object
implements ConfigurationSerializable

Represents a single firework effect.


Nested Class Summary
static class FireworkEffect.Builder
          This is a builder for FireworkEffects.
static class FireworkEffect.Type
          The type or shape of the effect.
 
Method Summary
static FireworkEffect.Builder builder()
          Construct a firework effect.
static ConfigurationSerializable deserialize(Map<String,Object> map)
           
 boolean equals(Object obj)
           
 List<Color> getColors()
          Get the primary colors of the firework effect.
 List<Color> getFadeColors()
          Get the fade colors of the firework effect.
 FireworkEffect.Type getType()
          Get the type of the firework effect.
 boolean hasFlicker()
          Get whether the firework effect flickers.
 int hashCode()
           
 boolean hasTrail()
          Get whether the firework effect has a trail.
 Map<String,Object> serialize()
          Creates a Map representation of this class.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

builder

public static FireworkEffect.Builder 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

public List<Color> getColors()
Get the primary colors of the firework effect.

Returns:
An immutable list of the primary colors

getFadeColors

public List<Color> getFadeColors()
Get the fade colors of the firework effect.

Returns:
An immutable list of the fade colors

getType

public FireworkEffect.Type getType()
Get the type of the firework effect.

Returns:
The effect type

deserialize

public static ConfigurationSerializable deserialize(Map<String,Object> map)
See Also:
ConfigurationSerializable

serialize

public Map<String,Object> 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 interface ConfigurationSerializable
Returns:
Map containing the current state of this class

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.