From 3ada9f4de74814c8de7211679efd33b987ebcced Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 24 Jul 2018 10:17:54 +1000 Subject: [PATCH] Add map ID API By: md_5 --- .../org/bukkit/inventory/meta/MapMeta.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java b/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java index a0e601429b..4bf9b39281 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java +++ b/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java @@ -7,6 +7,31 @@ import org.bukkit.Color; */ public interface MapMeta extends ItemMeta { + /** + * Checks for existence of a map ID number. + * + * @return true if this has a map ID number. + */ + boolean hasMapId(); + + /** + * Gets the map ID that is set. This is used to determine what map is + * displayed. + *

+ * Plugins should check that hasMapId() returns true before + * calling this method. + * + * @return the map ID that is set + */ + int getMapId(); + + /** + * Sets the map ID. This is used to determine what map is displayed. + * + * @param id the map id to set + */ + void setMapId(int id); + /** * Checks to see if this map is scaling. *