Today I've got source code that I can edit to match my servers preferences, but I've got problem with this task. Default action of the plugin is read things from yml file and create from it chest menu. Normally it works really good but I want to add 4 more variables to display different item, name and lore if player don't have specific permission. Normally I would check permission like test.test but in this case I must check this perm from yml. Here is the code: Code:java /** * @param Player * @return the icon, or null if there were errors. */ @SuppressWarnings("deprecation") public Icon loadIconFromConfigurationSection(ConfigurationSection node, String filename) { String cmd = node.getString("COMMAND"); String name = node.getString("NAME"); String name1 = node.getString("NAME-OFF");//new variable List<String> description = node.getStringList("LORE"); List<String> description1 = node.getStringList("LORE-OFF");//new variable String itemString = node.getString("ID"); String itemString1 = node.getString("ID-OFF");//new variable short data = (short) node.getInt("DATA-VALUE"); short data1 = (short) node.getInt("DATA-VALUE-OFF");//new variable double price = node.getDouble("PRICE"); int amount = node.getInt("AMOUNT"); String enchString = node.getString("ENCHANTMENT"); boolean keepOpen = node.getBoolean("KEEP-OPEN"); String perm = node.getString("PERMISSION"); String requiredItem = node.getString("REQUIRED-ITEM"); String color = node.getString("COLOR"); int itemId = 7; if (p.hasPermission(perm)) //in this place I try to check permission { if (itemString == null) { itemString = "BEDROCK"; ErrorLogger.addError("The item \"" + node.getName() + "\" in the file \"" + filename + "\" has no ID."); if (description != null) description.add("§cID not set."); } try { ItemStackReader reader = new ItemStackReader(itemString); itemId = reader.getMaterial().getId(); if (reader.hasDataValue()) data = reader.getDataValue(); if (reader.hasAmount()) amount = reader.getAmount(); } catch (ItemFormatException ex) { if (description != null) description.add("§cInvalid ID."); ErrorLogger.addError("The item \"" + node.getName() + "\" in the file \"" + filename + "\" has an invalid ID. " + ex.getError()); if (filename.equals("items.yml")) return null; } Icon icon = new Icon(Material.getMaterial(itemId)); if (price < 0.0) ErrorLogger.addError("The item \"" + node.getName() + "\" in the file \"" + filename + "\" has a negative PRICE."); else icon.setPrice(price); if (InventoryUtil.isLeatherArmor(Material.getMaterial(itemId)) && color != null) { LeatherArmorMeta armorMeta = (LeatherArmorMeta) icon.stack.getItemMeta(); try { armorMeta.setColor(InventoryUtil.readArmorColor(color)); icon.stack.setItemMeta(armorMeta); } catch (ArmorColorException ex) { ErrorLogger.addError("The armor \"" + node.getName() + "\" in the file \"" + filename + "\" has an invalid COLOR: " + ex.getError()); } } icon.setRequiredItem(requiredItem); icon.setDurability(data); icon.setAmount(amount); icon.setNameAndLore(name, description); icon.setCommands(Command.arrayFromString(cmd)); icon.setKeepOpen(keepOpen); icon.setPermission(perm); icon.addEnchantmentBundleArray(Utils.getEnchantmentsBundleFromString(enchString, node.getName(), filename)); return icon; } else { if (itemString1 == null) { itemString1 = "BEDROCK"; ErrorLogger.addError("The item \"" + node.getName() + "\" in the file \"" + filename + "\" has no ID."); if (description != null) description.add("§cID not set."); } try { ItemStackReader reader = new ItemStackReader(itemString1); itemId = reader.getMaterial().getId(); if (reader.hasDataValue()) data = reader.getDataValue(); if (reader.hasAmount()) amount = reader.getAmount(); } catch (ItemFormatException ex) { if (description != null) description.add("§cInvalid ID."); ErrorLogger.addError("The item \"" + node.getName() + "\" in the file \"" + filename + "\" has an invalid ID. " + ex.getError()); if (filename.equals("items.yml")) return null; } Icon icon = new Icon(Material.getMaterial(itemId)); if (price < 0.0) ErrorLogger.addError("The item \"" + node.getName() + "\" in the file \"" + filename + "\" has a negative PRICE."); else icon.setPrice(price); if (InventoryUtil.isLeatherArmor(Material.getMaterial(itemId)) && color != null) { LeatherArmorMeta armorMeta = (LeatherArmorMeta) icon.stack.getItemMeta(); try { armorMeta.setColor(InventoryUtil.readArmorColor(color)); icon.stack.setItemMeta(armorMeta); } catch (ArmorColorException ex) { ErrorLogger.addError("The armor \"" + node.getName() + "\" in the file \"" + filename + "\" has an invalid COLOR: " + ex.getError()); } } icon.setRequiredItem(requiredItem); icon.setDurability(data1); icon.setAmount(amount); icon.setNameAndLore(name1, description1); icon.setCommands(Command.arrayFromString(cmd)); icon.setKeepOpen(keepOpen); icon.setPermission(perm); icon.addEnchantmentBundleArray(Utils.getEnchantmentsBundleFromString(enchString, node.getName(), filename)); return icon; } } please help me Bump EDIT by Moderator: merged posts, please use the edit button instead of double posting.