public class GlowMetaPotion extends GlowMetaItem implements org.bukkit.inventory.meta.PotionMeta
Constructor and Description |
---|
GlowMetaPotion(org.bukkit.inventory.meta.ItemMeta meta)
Creates an instance by copying from the given
ItemMeta . |
Modifier and Type | Method and Description |
---|---|
boolean |
addCustomEffect(org.bukkit.potion.PotionEffect effect,
boolean overwrite) |
boolean |
clearCustomEffects() |
void |
clearCustomEffects0() |
GlowMetaPotion |
clone() |
static String |
dataToString(org.bukkit.potion.PotionData basePotionData)
Converts a PotionData to a Potion ID string.
|
static org.bukkit.potion.PotionEffect |
fromNbt(CompoundTag tag)
Reads a
PotionEffect from an NBT compound tag. |
org.bukkit.potion.PotionData |
getBasePotionData() |
org.bukkit.Color |
getColor() |
List<org.bukkit.potion.PotionEffect> |
getCustomEffects() |
boolean |
hasColor() |
boolean |
hasCustomEffect(org.bukkit.potion.PotionEffectType type) |
boolean |
hasCustomEffects() |
boolean |
isApplicable(org.bukkit.Material material)
Check whether this ItemMeta can be applied to the given material.
|
boolean |
removeCustomEffect(org.bukkit.potion.PotionEffectType type) |
Map<String,Object> |
serialize() |
void |
setBasePotionData(org.bukkit.potion.PotionData basePotionData) |
void |
setColor(org.bukkit.Color color) |
boolean |
setMainEffect(org.bukkit.potion.PotionEffectType type) |
static CompoundTag |
toNbt(org.bukkit.potion.PotionEffect effect)
Converts a
PotionEffect to an NBT compound tag. |
addEnchant, addItemFlags, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, readNbtEnchants, removeEnchant, removeItemFlags, serializeEnchants, setDisplayName, setLocalizedName, setLore, setUnbreakable, spigot, toString, writeNbtEnchants
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEnchant, addItemFlags, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeEnchant, removeItemFlags, setDisplayName, setLocalizedName, setLore, setUnbreakable, spigot
public GlowMetaPotion(org.bukkit.inventory.meta.ItemMeta meta)
ItemMeta
. If that item is another
PotionMeta
, its color, PotionData
and PotionEffect
s are copied;
otherwise, the new potion has no effects.meta
- the ItemMeta
to copypublic static org.bukkit.potion.PotionEffect fromNbt(CompoundTag tag)
PotionEffect
from an NBT compound tag.tag
- a potion effect NBT compound tagtag
as a PotionEffect
public static CompoundTag toNbt(org.bukkit.potion.PotionEffect effect)
PotionEffect
to an NBT compound tag.effect
- the potion effecteffect
as an NBT compound tagpublic boolean isApplicable(org.bukkit.Material material)
GlowMetaItem
isApplicable
in class GlowMetaItem
material
- The Material.public GlowMetaPotion clone()
clone
in interface org.bukkit.inventory.meta.ItemMeta
clone
in interface org.bukkit.inventory.meta.PotionMeta
clone
in class GlowMetaItem
public Map<String,Object> serialize()
serialize
in interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
in class GlowMetaItem
public boolean hasCustomEffects()
hasCustomEffects
in interface org.bukkit.inventory.meta.PotionMeta
hasCustomEffects
in interface org.bukkit.potion.PotionDataHolder
public List<org.bukkit.potion.PotionEffect> getCustomEffects()
getCustomEffects
in interface org.bukkit.inventory.meta.PotionMeta
getCustomEffects
in interface org.bukkit.potion.PotionDataHolder
public boolean addCustomEffect(org.bukkit.potion.PotionEffect effect, boolean overwrite)
addCustomEffect
in interface org.bukkit.inventory.meta.PotionMeta
addCustomEffect
in interface org.bukkit.potion.PotionDataHolder
public boolean removeCustomEffect(org.bukkit.potion.PotionEffectType type)
removeCustomEffect
in interface org.bukkit.inventory.meta.PotionMeta
removeCustomEffect
in interface org.bukkit.potion.PotionDataHolder
public boolean hasCustomEffect(org.bukkit.potion.PotionEffectType type)
hasCustomEffect
in interface org.bukkit.inventory.meta.PotionMeta
hasCustomEffect
in interface org.bukkit.potion.PotionDataHolder
public void clearCustomEffects0()
clearCustomEffects0
in interface org.bukkit.potion.PotionDataHolder
public boolean setMainEffect(org.bukkit.potion.PotionEffectType type)
setMainEffect
in interface org.bukkit.inventory.meta.PotionMeta
public boolean clearCustomEffects()
clearCustomEffects
in interface org.bukkit.inventory.meta.PotionMeta
public boolean hasColor()
hasColor
in interface org.bukkit.inventory.meta.PotionMeta
hasColor
in interface org.bukkit.potion.PotionDataHolder
public static String dataToString(org.bukkit.potion.PotionData basePotionData)
basePotionData
- the PotionData to convertpublic org.bukkit.potion.PotionData getBasePotionData()
getBasePotionData
in interface org.bukkit.inventory.meta.PotionMeta
getBasePotionData
in interface org.bukkit.potion.PotionDataHolder
public void setBasePotionData(org.bukkit.potion.PotionData basePotionData)
setBasePotionData
in interface org.bukkit.inventory.meta.PotionMeta
setBasePotionData
in interface org.bukkit.potion.PotionDataHolder
public org.bukkit.Color getColor()
getColor
in interface org.bukkit.inventory.meta.PotionMeta
getColor
in interface org.bukkit.potion.PotionDataHolder
public void setColor(org.bukkit.Color color)
setColor
in interface org.bukkit.inventory.meta.PotionMeta
setColor
in interface org.bukkit.potion.PotionDataHolder
Copyright © 2021. All rights reserved.