Improved map parts preview with a checkerboard-like display.

* NEW: checkerboard-like display of the map part, alternating between paper and empty-map.
This commit is contained in:
Amaury Carrade 2015-07-12 16:26:01 +02:00
parent 7809c95d80
commit d69e2aa34b

View File

@ -156,7 +156,11 @@ public class MapDetailGui extends AbstractGui
private ItemStack getMapPartRepresentation(int col, int row)
{
ItemStack part = new ItemStack(Material.MAP);
Material partMaterial = Material.PAPER;
if((col % 2 == 0 && row % 2 == 0) || (col % 2 == 1 && row % 2 == 1))
partMaterial = Material.EMPTY_MAP;
ItemStack part = new ItemStack(partMaterial);
ItemMeta meta = part.getItemMeta();
meta.setDisplayName(ChatColor.GREEN + "Map part");