Search in sources :

Example 96 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class Spell method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = null;
    if (entityPet instanceof IEntityWizard) {
        IEntityWizard var = (IEntityWizard) entityPet;
        WizardSpell typeID = var.getSpell();
        switch(typeID) {
            case BLINDNESS:
                item = type.getDataItemByName("spell", 0);
                break;
            case DISAPPEAR:
                item = type.getDataItemByName("spell", 1);
                break;
            case FANGS:
                item = type.getDataItemByName("spell", 2);
                break;
            case NONE:
                item = type.getDataItemByName("spell", 3);
                break;
            case SUMMON_VEX:
                item = type.getDataItemByName("spell", 4);
                break;
            case WOLOLO:
                item = type.getDataItemByName("spell", 5);
                break;
        }
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) WizardSpell(simplepets.brainsynder.wrapper.WizardSpell) IEntityWizard(simplepets.brainsynder.api.entity.misc.IEntityWizard)

Example 97 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class WitherSize method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = type.getDataItemByName("withersize", 0);
    if (entityPet instanceof IEntityWitherPet) {
        IEntityWitherPet var = (IEntityWitherPet) entityPet;
        item.withName(item.getName().replace("%value%", String.valueOf(var.isSmall())));
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) IEntityWitherPet(simplepets.brainsynder.api.entity.hostile.IEntityWitherPet)

Example 98 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class Nectar method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    ItemBuilder item = ItemBuilder.getSkull(SkullType.PLAYER).setTexture("http://textures.minecraft.net/texture/b727d0ab03f5cd022f8705d3f7f133ca4920eae8e1e47b5074433a137e691e4e");
    item.withName("&6Has Nectar: &e%value%");
    return new ArrayList<>(Collections.singleton(item));
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Example 99 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class Sitting method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = type.getDataItemByName("sitting", 0);
    if (entityPet instanceof ITameable) {
        ITameable var = (ITameable) entityPet;
        item.withName(item.getName().replace("%value%", String.valueOf(var.isSitting())));
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ITameable(simplepets.brainsynder.api.entity.misc.ITameable)

Example 100 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class Sitting method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    ItemBuilder item = new ItemBuilder(Utilities.fetchMaterial("WOOD_STAIRS", "OAK_STAIRS"));
    item.withName("&6Sitting: &e%value%");
    return new ArrayList<>(Collections.singleton(item));
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Aggregations

ItemBuilder (simple.brainsynder.api.ItemBuilder)108 ArrayList (java.util.ArrayList)65 PetDefault (simplepets.brainsynder.pet.PetDefault)13 List (java.util.List)11 IEntityPet (simplepets.brainsynder.api.entity.IEntityPet)11 MenuItemAbstract (simplepets.brainsynder.menu.menuItems.base.MenuItemAbstract)11 ValueType (simplepets.brainsynder.utils.ValueType)11 ServerVersion (simple.brainsynder.utils.ServerVersion)10 DyeColorWrapper (simplepets.brainsynder.wrapper.DyeColorWrapper)8 JSONArray (org.json.simple.JSONArray)7 IEntityPandaPet (simplepets.brainsynder.api.entity.passive.IEntityPandaPet)6 IEntityFoxPet (simplepets.brainsynder.api.entity.passive.IEntityFoxPet)5 Utilities (simplepets.brainsynder.utils.Utilities)5 ItemStack (org.bukkit.inventory.ItemStack)4 IEntityHorsePet (simplepets.brainsynder.api.entity.passive.IEntityHorsePet)3 IEntityTropicalFishPet (simplepets.brainsynder.api.entity.passive.IEntityTropicalFishPet)3 SkullType (simple.brainsynder.utils.SkullType)2 IEntityArmorStandPet (simplepets.brainsynder.api.entity.ambient.IEntityArmorStandPet)2 IEntityWitherPet (simplepets.brainsynder.api.entity.hostile.IEntityWitherPet)2 IEntityZombiePet (simplepets.brainsynder.api.entity.hostile.IEntityZombiePet)2