Search in sources :

Example 11 with ItemBuilder

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

the class MooshroomColor method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    List<ItemBuilder> items = new ArrayList<>();
    for (MooshroomType type : MooshroomType.values()) {
        ItemBuilder builder = type.getIcon();
        builder.withName("&6Color: &e" + WordUtils.capitalize(type.name().toLowerCase()));
        items.add(builder);
    }
    return items;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList) MooshroomType(simplepets.brainsynder.wrapper.MooshroomType)

Example 12 with ItemBuilder

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

the class ParrotColor method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    List<ItemBuilder> items = new ArrayList<>();
    ItemBuilder item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 11);
    item.withName("&9Blue");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 9);
    item.withName("&3Cyan");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 8);
    item.withName("&7Gray");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 13);
    item.withName("&2Green");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 14);
    item.withName("&cRed");
    items.add(item);
    return items;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Example 13 with ItemBuilder

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

the class PufferSize method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = type.getDataItemByName("puffersize", 0);
    if (getEntityPet() instanceof IEntityPufferFishPet) {
        IEntityPufferFishPet var = (IEntityPufferFishPet) getEntityPet();
        PufferState typeID = PufferState.SMALL;
        if (var.getPuffState() != null)
            typeID = var.getPuffState();
        PufferState prev = PufferState.getPrevious(typeID);
        PufferState next = PufferState.getNext(typeID);
        List<String> lore = new ArrayList<>();
        for (Object s : (JSONArray) item.toJSON().get("lore")) {
            String str = String.valueOf(s);
            lore.add(str.replace("%prev_state%", WordUtils.capitalize(prev.name().toLowerCase().replace("_", " "))).replace("%curr_state%", WordUtils.capitalize(typeID.name().toLowerCase().replace("_", " "))).replace("%next_state%", WordUtils.capitalize(next.name().toLowerCase().replace("_", " "))));
        }
        item.withLore(lore);
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) PufferState(simplepets.brainsynder.wrapper.PufferState) IEntityPufferFishPet(simplepets.brainsynder.api.entity.hostile.IEntityPufferFishPet) ArrayList(java.util.ArrayList) JSONArray(org.json.simple.JSONArray)

Example 14 with ItemBuilder

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

the class PufferSize method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    List<ItemBuilder> items = new ArrayList<>();
    ItemBuilder item = ItemBuilder.getSkull(simple.brainsynder.utils.SkullType.PLAYER);
    item.setTexture("http://textures.minecraft.net/texture/17152876bc3a96dd2a2299245edb3beef647c8a56ac8853a687c3e7b5d8bb");
    item.withName(" ");
    item.addLore("&6Previous: &7%prev_state%", "&6Current: &e%curr_state%", "&6Next: &7%next_state%");
    items.add(item);
    return items;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Example 15 with ItemBuilder

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

the class RabbitColor 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);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 12);
    item.withName("&6Brown");
    items.add(item);
    item = new ItemBuilder(Material.GOLD_BLOCK);
    item.withName("&6Golden");
    items.add(item);
    item = ItemBuilder.getColored(MatType.WOOL, 0);
    item.withName("&6Black and White");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 7);
    item.withName("&6Salt and Pepper");
    items.add(item);
    item = new ItemBuilder(Material.REDSTONE_BLOCK);
    item.withName("&6Killer Bunny");
    items.add(item);
    item = new ItemBuilder(Material.QUARTZ_BLOCK);
    item.withName("&6White");
    items.add(item);
    return items;
}
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