Search in sources :

Example 6 with ItemBuilder

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

the class Hang method getItem.

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

Example 7 with ItemBuilder

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

the class Hang method getDefaultItems.

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

Example 8 with ItemBuilder

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

the class HorseColor method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = null;
    if (entityPet instanceof IEntityHorsePet) {
        IEntityHorsePet var = (IEntityHorsePet) entityPet;
        HorseColorType typeID = HorseColorType.WHITE;
        if (var.getColor() != null) {
            typeID = var.getColor();
        }
        switch(typeID) {
            case BLACK:
                item = type.getDataItemByName("horsecolor", 0);
                break;
            case CHESTNUT:
                item = type.getDataItemByName("horsecolor", 1);
                break;
            case CREAMY:
                item = type.getDataItemByName("horsecolor", 2);
                break;
            case BROWN:
                item = type.getDataItemByName("horsecolor", 3);
                break;
            case DARKBROWN:
                item = type.getDataItemByName("horsecolor", 4);
                break;
            case GRAY:
                item = type.getDataItemByName("horsecolor", 5);
                break;
            case WHITE:
                item = type.getDataItemByName("horsecolor", 6);
                break;
        }
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) HorseColorType(simplepets.brainsynder.wrapper.HorseColorType) IEntityHorsePet(simplepets.brainsynder.api.entity.passive.IEntityHorsePet)

Example 9 with ItemBuilder

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

the class HorseColor method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    List<ItemBuilder> items = new ArrayList<>();
    ItemBuilder item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 15);
    item.withName("&6Black");
    items.add(item.clone());
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.STAINED_CLAY, 8);
    item.withName("&6Chestnut");
    items.add(item.clone());
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 4);
    item.withName("&6Creamy");
    items.add(item.clone());
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 12);
    item.withName("&6Brown");
    items.add(item.clone());
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.STAINED_CLAY, 7);
    item.withName("&6Dark Brown");
    items.add(item.clone());
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 7);
    item.withName("&6Gray");
    items.add(item.clone());
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 0);
    item.withName("&6White");
    items.add(item.clone());
    return items;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Example 10 with ItemBuilder

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

the class Johnny method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    ItemBuilder item = new ItemBuilder(Material.IRON_AXE);
    item.withName("&6Johnny: &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