Having trouble finding the right code to remove attributes from items? here you go.
First off, this plugin is free. Because it doesn't makes sense to sell it, since it would be leaked. Anyway, I'm going to explain how to use this library.
For example, I have a menu and I want to remove the thing that's under your lore (see here) to remove it, you can use this code:
This will create an item and remove the attribute lore. See example
here
First off, this plugin is free. Because it doesn't makes sense to sell it, since it would be leaked. Anyway, I'm going to explain how to use this library.
For example, I have a menu and I want to remove the thing that's under your lore (see here) to remove it, you can use this code:
Code (Text):
public void open(Player paramPlayer) {
Inventory inventory = Bukkit.createInventory(null, 3 * 9, "Inventory");
{
ItemStack itemStack = new ItemStack(Material.DIAMOND_SWORD);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setDisplayName(ChatColor.GREEN + "You item name!");
List<String> lore = new ArrayList<>();
lore.add(" ");
lore.add(ChatColor.GRAY + "Some lore here");
lore.add(ChatColor.GRAY + "more here");
itemStack.setItemMeta(itemMeta);
inventory.setItem(15, AttributeAPI.removeAttrbutes(itemStack));
}
}
Inventory inventory = Bukkit.createInventory(null, 3 * 9, "Inventory");
{
ItemStack itemStack = new ItemStack(Material.DIAMOND_SWORD);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setDisplayName(ChatColor.GREEN + "You item name!");
List<String> lore = new ArrayList<>();
lore.add(" ");
lore.add(ChatColor.GRAY + "Some lore here");
lore.add(ChatColor.GRAY + "more here");
itemStack.setItemMeta(itemMeta);
inventory.setItem(15, AttributeAPI.removeAttrbutes(itemStack));
}
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
AttributeAPI is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11. Downloaded 175 times (via Spigot). Download it and open it directly in the game.