From cd9b310aa22806504db0d99289973e282282ac99 Mon Sep 17 00:00:00 2001 From: Amaury Carrade Date: Sun, 12 Jul 2015 03:16:38 +0200 Subject: [PATCH] Changed the images display in the GUI a little bit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- .../fr/moribus/imageonmap/gui/list/MapListGui.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/fr/moribus/imageonmap/gui/list/MapListGui.java b/src/main/java/fr/moribus/imageonmap/gui/list/MapListGui.java index 092a7cc..f24ee39 100644 --- a/src/main/java/fr/moribus/imageonmap/gui/list/MapListGui.java +++ b/src/main/java/fr/moribus/imageonmap/gui/list/MapListGui.java @@ -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 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" ));