use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.
the class Saddle method getItem.
@Override
public ItemBuilder getItem() {
ItemBuilder item = type.getDataItemByName("saddle", 0);
try {
if (entityPet instanceof IEntityPigPet) {
IEntityPigPet pig = (IEntityPigPet) entityPet;
item.withName(item.getName().replace("%value%", String.valueOf(pig.hasSaddle())));
} else if (entityPet instanceof IHorseAbstract) {
IHorseAbstract var = (IHorseAbstract) entityPet;
item.withName(item.getName().replace("%value%", String.valueOf(var.isSaddled())));
}
} catch (Exception e) {
item.withName("&6Has Saddle: &cERROR");
}
return item;
}
use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.
the class Saddle method getDefaultItems.
@Override
public List<ItemBuilder> getDefaultItems() {
ItemBuilder item = new ItemBuilder(Material.SADDLE);
item.withName("&6Has Saddle: &e%value%");
return new ArrayList<>(Collections.singleton(item));
}
use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.
the class Shaking method getItem.
@Override
public ItemBuilder getItem() {
ItemBuilder item = type.getDataItemByName("shaking", 0);
if (entityPet instanceof IEntityZombiePet) {
IEntityZombiePet var = (IEntityZombiePet) entityPet;
item.withName(item.getName().replace("%value%", String.valueOf(var.isShaking())));
}
return item;
}
use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.
the class ShulkerClosed method getItem.
@Override
public ItemBuilder getItem() {
ItemBuilder item = type.getDataItemByName("shulkerclosed", 0);
if (getEntityPet() instanceof IEntityShulkerPet) {
IEntityShulkerPet var = (IEntityShulkerPet) getEntityPet();
item.withName(item.getName().replace("%value%", String.valueOf(var.isClosed())));
}
return item;
}
use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.
the class Spell method getDefaultItems.
@Override
public List<ItemBuilder> getDefaultItems() {
List<ItemBuilder> items = new ArrayList<>();
ItemBuilder item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.INK_SACK, 0);
item.withName(WordUtils.capitalize(WizardSpell.BLINDNESS.name().toLowerCase().replace('_', ' ')));
items.add(item);
item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.INK_SACK, 12);
item.withName(WordUtils.capitalize(WizardSpell.DISAPPEAR.name().toLowerCase().replace('_', ' ')));
items.add(item);
item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.INK_SACK, 3);
item.withName(WordUtils.capitalize(WizardSpell.FANGS.name().toLowerCase().replace('_', ' ')));
items.add(item);
item = new ItemBuilder(Material.BARRIER);
item.withName(WordUtils.capitalize(WizardSpell.NONE.name().toLowerCase().replace('_', ' ')));
items.add(item);
item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.INK_SACK, 8);
item.withName(WordUtils.capitalize(WizardSpell.SUMMON_VEX.name().toLowerCase().replace('_', ' ')));
items.add(item);
item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.INK_SACK, 14);
item.withName(WordUtils.capitalize(WizardSpell.WOLOLO.name().toLowerCase().replace('_', ' ')));
items.add(item);
return items;
}
Aggregations