summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/inventory/meta
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-17 17:24:01 +1100
committermd_5 <git@md-5.net>2016-11-17 17:24:01 +1100
commitbf804e6e4a9f51c646d8e1e81023f29ed18d7da6 (patch)
treeebbfc69682d7e6cbf2518ed0ea39463b9defff16 /src/main/java/org/bukkit/inventory/meta
parentac338aa46c95600372e0b9d7f8e8f7a4c6f84c45 (diff)
downloadbukkit-bf804e6e4a9f51c646d8e1e81023f29ed18d7da6.tar
bukkit-bf804e6e4a9f51c646d8e1e81023f29ed18d7da6.tar.gz
bukkit-bf804e6e4a9f51c646d8e1e81023f29ed18d7da6.tar.lz
bukkit-bf804e6e4a9f51c646d8e1e81023f29ed18d7da6.tar.xz
bukkit-bf804e6e4a9f51c646d8e1e81023f29ed18d7da6.zip
SPIGOT-2768: Fully implement map color
Diffstat (limited to 'src/main/java/org/bukkit/inventory/meta')
-rw-r--r--src/main/java/org/bukkit/inventory/meta/MapMeta.java31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/inventory/meta/MapMeta.java b/src/main/java/org/bukkit/inventory/meta/MapMeta.java
index 4dbe95d5..a0e60142 100644
--- a/src/main/java/org/bukkit/inventory/meta/MapMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/MapMeta.java
@@ -1,5 +1,7 @@
package org.bukkit.inventory.meta;
+import org.bukkit.Color;
+
/**
* Represents a map that can be scalable.
*/
@@ -37,11 +39,38 @@ public interface MapMeta extends ItemMeta {
String getLocationName();
/**
- * Sets the location name.
+ * Sets the location name. A custom map color will alter the display of the
+ * map in an inventory slot.
*
* @param name the name to set
*/
void setLocationName(String name);
+ /**
+ * Checks for existence of a map color.
+ *
+ * @return true if this has a custom map color
+ */
+ boolean hasColor();
+
+ /**
+ * Gets the map color that is set. A custom map color will alter the display
+ * of the map in an inventory slot.
+ * <p>
+ * Plugins should check that hasColor() returns <code>true</code> before
+ * calling this method.
+ *
+ * @return the map color that is set
+ */
+ Color getColor();
+
+ /**
+ * Sets the map color. A custom map color will alter the display of the map
+ * in an inventory slot.
+ *
+ * @param color the color to set
+ */
+ void setColor(Color color);
+
MapMeta clone();
}