Search in sources :

Example 11 with ItemDatabase

use of de.Keyle.MyPet.api.util.inventory.material.ItemDatabase in project MyPet by xXKeyleXx.

the class PlatformHelper method itemstackToString.

@Override
public String itemstackToString(org.bukkit.inventory.ItemStack itemStack) {
    ItemDatabase itemDatabase = MyPetApi.getServiceManager().getService(ItemDatabase.class).get();
    String itemstack = itemDatabase.getByID(itemStack.getType().getKey().getKey()).getId();
    if (itemStack.hasItemMeta()) {
        itemstack += " " + CraftItemStack.asNMSCopy(itemStack).getTag().toString();
    }
    return itemstack;
}
Also used : ItemDatabase(de.Keyle.MyPet.api.util.inventory.material.ItemDatabase)

Aggregations

ItemDatabase (de.Keyle.MyPet.api.util.inventory.material.ItemDatabase)11 MaterialHolder (de.Keyle.MyPet.api.util.inventory.material.MaterialHolder)4 IconMenu (de.Keyle.MyPet.api.gui.IconMenu)2 IconMenuItem (de.Keyle.MyPet.api.gui.IconMenuItem)2 SkilltreeIcon (de.Keyle.MyPet.api.skill.skilltree.SkilltreeIcon)2 TagInt (de.keyle.knbt.TagInt)2 TagString (de.keyle.knbt.TagString)2 Player (org.bukkit.entity.Player)2 MyPet (de.Keyle.MyPet.api.entity.MyPet)1 MyPetPlayer (de.Keyle.MyPet.api.player.MyPetPlayer)1 Skilltree (de.Keyle.MyPet.api.skill.skilltree.Skilltree)1 PetShop (de.Keyle.MyPet.util.shop.PetShop)1 ShopManager (de.Keyle.MyPet.util.shop.ShopManager)1 TagByte (de.keyle.knbt.TagByte)1 TagCompound (de.keyle.knbt.TagCompound)1 TagShort (de.keyle.knbt.TagShort)1 Material (org.bukkit.Material)1 ConsoleCommandSender (org.bukkit.command.ConsoleCommandSender)1 ItemStack (org.bukkit.inventory.ItemStack)1 BukkitRunnable (org.bukkit.scheduler.BukkitRunnable)1