diff options
author | md_5 <git@md-5.net> | 2016-11-18 09:49:31 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-18 09:49:31 +1100 |
commit | 84845e07fe6b11376f21b02296522f9ae870b899 (patch) | |
tree | da77ce47564f073a4799f0f88b76090ab011491f /src | |
parent | c6bf40e4e7600e252157f97e394720e3ca3a9f9c (diff) | |
download | bukkit-84845e07fe6b11376f21b02296522f9ae870b899.tar bukkit-84845e07fe6b11376f21b02296522f9ae870b899.tar.gz bukkit-84845e07fe6b11376f21b02296522f9ae870b899.tar.lz bukkit-84845e07fe6b11376f21b02296522f9ae870b899.tar.xz bukkit-84845e07fe6b11376f21b02296522f9ae870b899.zip |
SPIGOT-2782: Custom Colors for Potions
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/inventory/meta/PotionMeta.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/meta/PotionMeta.java b/src/main/java/org/bukkit/inventory/meta/PotionMeta.java index 2be09e2e..d9151259 100644 --- a/src/main/java/org/bukkit/inventory/meta/PotionMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/PotionMeta.java @@ -1,5 +1,6 @@ package org.bukkit.inventory.meta; +import org.bukkit.Color; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionData; @@ -89,6 +90,32 @@ public interface PotionMeta extends ItemMeta { */ boolean clearCustomEffects(); + /** + * Checks for existence of a potion color. + * + * @return true if this has a custom potion color + */ + boolean hasColor(); + + /** + * Gets the potion color that is set. A custom potion color will alter the + * display of the potion in an inventory slot. + * <p> + * Plugins should check that hasColor() returns <code>true</code> before + * calling this method. + * + * @return the potion color that is set + */ + Color getColor(); + + /** + * Sets the potion color. A custom potion color will alter the display of + * the potion in an inventory slot. + * + * @param color the color to set + */ + void setColor(Color color); + @Override PotionMeta clone(); } |