Changed the images display in the GUI a little bit.

* NEW: The title of the tooltip of an image is now the name of this image (currently, “Map” everywhere).
* NEW: moved the map ID in the tooltip.
This commit is contained in:
Amaury Carrade 2015-07-12 03:16:38 +02:00
parent bebac6e621
commit cd9b310aa2

View File

@ -30,13 +30,11 @@ import org.bukkit.inventory.meta.*;
import java.util.*;
public class MapListGui extends AbstractGui {
public class MapListGui extends AbstractGui
{
private final Integer MAPS_PER_PAGE = 7 * 3;
private ImageMap.Type mapsType;
private List<ImageMap> maps = new ArrayList<>();
private int currentPage = 0;
@ -231,11 +229,13 @@ public class MapListGui extends AbstractGui {
ItemMeta meta = icon.getItemMeta();
meta.setDisplayName(ChatColor.GREEN + "" + ChatColor.BOLD + map.getId().replace("-", " "));
meta.setDisplayName(ChatColor.GREEN + "" + ChatColor.BOLD + map.getName());
meta.setLore(Arrays.asList(
ChatColor.WHITE + "" + map.getMapCount() + " map" + (map.getMapCount() != 1 ? "s" : ""),
"",
ChatColor.GRAY + "Map ID: " + map.getId(),
"",
ChatColor.GRAY + "» Left-click to get this map",
ChatColor.GRAY + "» Right-click for details"
));