Search in sources :

Example 1 with NBTCompound

use of com.iridium.iridiumcore.dependencies.nbtapi.NBTCompound in project IridiumSkyblock by Iridium-Development.

the class IslandManager method getIslandCrystal.

public ItemStack getIslandCrystal(int amount) {
    ItemStack itemStack = ItemStackUtils.makeItem(IridiumSkyblock.getInstance().getConfiguration().islandCrystal, Collections.singletonList(new Placeholder("amount", String.valueOf(amount))));
    NBTItem nbtItem = new NBTItem(itemStack);
    NBTCompound nbtCompound = nbtItem.getOrCreateCompound("iridiumskyblock");
    nbtCompound.setInteger("islandCrystals", amount);
    return nbtItem.getItem();
}
Also used : Placeholder(com.iridium.iridiumcore.utils.Placeholder) NBTCompound(com.iridium.iridiumcore.dependencies.nbtapi.NBTCompound) NBTItem(com.iridium.iridiumcore.dependencies.nbtapi.NBTItem) ItemStack(org.bukkit.inventory.ItemStack)

Aggregations

NBTCompound (com.iridium.iridiumcore.dependencies.nbtapi.NBTCompound)1 NBTItem (com.iridium.iridiumcore.dependencies.nbtapi.NBTItem)1 Placeholder (com.iridium.iridiumcore.utils.Placeholder)1 ItemStack (org.bukkit.inventory.ItemStack)1