mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-04 05:25:28 +02:00
2.1.143
This commit is contained in:
@@ -15,7 +15,6 @@ import org.bukkit.inventory.Recipe;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public final class ItemUtils {
|
||||
@@ -486,22 +485,22 @@ public final class ItemUtils {
|
||||
return itemMeta.hasDisplayName() && itemMeta.getDisplayName().equals(ChatColor.GOLD + LocaleLoader.getString("Item.ChimaeraWing.Name"));
|
||||
}
|
||||
|
||||
public static void addAbilityLore(@NotNull ItemStack itemStack) {
|
||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
List<String> itemLore = new ArrayList<>();
|
||||
|
||||
if(itemMeta == null)
|
||||
return;
|
||||
|
||||
if (itemMeta.hasLore()) {
|
||||
itemLore = itemMeta.getLore();
|
||||
}
|
||||
|
||||
itemLore.add("mcMMO Ability Tool");
|
||||
|
||||
itemMeta.setLore(itemLore);
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
}
|
||||
// public static void addAbilityLore(@NotNull ItemStack itemStack) {
|
||||
// ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
// List<String> itemLore = new ArrayList<>();
|
||||
//
|
||||
// if(itemMeta == null)
|
||||
// return;
|
||||
//
|
||||
// if (itemMeta.hasLore()) {
|
||||
// itemLore = itemMeta.getLore();
|
||||
// }
|
||||
//
|
||||
// itemLore.add("mcMMO Ability Tool");
|
||||
//
|
||||
// itemMeta.setLore(itemLore);
|
||||
// itemStack.setItemMeta(itemMeta);
|
||||
// }
|
||||
|
||||
public static void removeAbilityLore(@NotNull ItemStack itemStack) {
|
||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
|
Reference in New Issue
Block a user