fixed issue with /mi browse only

This commit is contained in:
Indyuce 2019-08-29 17:59:39 +02:00
parent bcfe82f475
commit 7485751439

View File

@ -48,8 +48,6 @@ public class ItemBrowser extends PluginInventory {
int max = page * slots.length;
int n = 0;
List<String> itemIds = new ArrayList<>(type.getConfigFile().getConfig().getKeys(false));
/*
* displays all possible item types if no type was previously selected
* by the player
@ -97,6 +95,7 @@ public class ItemBrowser extends PluginInventory {
return inv;
}
ItemStack error = VersionMaterial.RED_STAINED_GLASS_PANE.toItem();
ItemMeta errorMeta = error.getItemMeta();
errorMeta.setDisplayName(ChatColor.RED + "- Error -");
@ -106,6 +105,8 @@ public class ItemBrowser extends PluginInventory {
errorMeta.setLore(errorLore);
error.setItemMeta(errorMeta);
List<String> itemIds = new ArrayList<>(type.getConfigFile().getConfig().getKeys(false));
/*
* displays every item in a specific type. items are cached inside the
* map at the top to reduce performance impact and are directly rendered