Commits
md_5 authored bf804e6e4a9
1 1 | package org.bukkit.inventory.meta; |
2 2 | |
3 + | import org.bukkit.Color; |
4 + | |
3 5 | /** |
4 6 | * Represents a map that can be scalable. |
5 7 | */ |
6 8 | public interface MapMeta extends ItemMeta { |
7 9 | |
8 10 | /** |
9 11 | * Checks to see if this map is scaling. |
10 12 | * |
11 13 | * @return true if this map is scaling |
12 14 | */ |
30 32 | * Gets the location name that is set. |
31 33 | * <p> |
32 34 | * Plugins should check that hasLocationName() returns <code>true</code> |
33 35 | * before calling this method. |
34 36 | * |
35 37 | * @return the location name that is set |
36 38 | */ |
37 39 | String getLocationName(); |
38 40 | |
39 41 | /** |
40 - | * Sets the location name. |
42 + | * Sets the location name. A custom map color will alter the display of the |
43 + | * map in an inventory slot. |
41 44 | * |
42 45 | * @param name the name to set |
43 46 | */ |
44 47 | void setLocationName(String name); |
45 48 | |
49 + | /** |
50 + | * Checks for existence of a map color. |
51 + | * |
52 + | * @return true if this has a custom map color |
53 + | */ |
54 + | boolean hasColor(); |
55 + | |
56 + | /** |
57 + | * Gets the map color that is set. A custom map color will alter the display |
58 + | * of the map in an inventory slot. |
59 + | * <p> |
60 + | * Plugins should check that hasColor() returns <code>true</code> before |
61 + | * calling this method. |
62 + | * |
63 + | * @return the map color that is set |
64 + | */ |
65 + | Color getColor(); |
66 + | |
67 + | /** |
68 + | * Sets the map color. A custom map color will alter the display of the map |
69 + | * in an inventory slot. |
70 + | * |
71 + | * @param color the color to set |
72 + | */ |
73 + | void setColor(Color color); |
74 + | |
46 75 | MapMeta clone(); |
47 76 | } |