001 package org.bukkit.inventory.meta; 002 003 import org.bukkit.FireworkEffect; 004 import org.bukkit.Material; 005 006 /** 007 * Represents a meta that can store a single FireworkEffect. An example 008 * includes {@link Material#FIREWORK_CHARGE}. 009 */ 010 public interface FireworkEffectMeta extends ItemMeta { 011 012 /** 013 * Sets the firework effect for this meta. 014 * 015 * @param effect the effect to set, or null to indicate none. 016 */ 017 void setEffect(FireworkEffect effect); 018 019 /** 020 * Checks if this meta has an effect. 021 * 022 * @return true if this meta has an effect, false otherwise 023 */ 024 boolean hasEffect(); 025 026 /** 027 * Gets the firework effect for this meta. 028 * 029 * @return the current effect, or null if none 030 */ 031 FireworkEffect getEffect(); 032 033 FireworkEffectMeta clone(); 034 }