Package de.Keyle.MyPet.api.entity
Annotation Interface ShopInfo
Annotation to define shop information for a pet type.
Applied to pet type interfaces (e.g., MyZombie, MyAllay) to enable
automatic inclusion in the generated pet-shops.yml file.
Only pets with this annotation will appear in the shop.
Pets implementing PetBaby will also appear in the "babies" shop.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptiondoubleThe price for the baby variant in the babies shop.The description shown in the shop GUI lore.The display name in the shop GUI.doubleThe starting experience for the purchased pet.The material name for the shop icon (e.g., "zombie_head").String[]Additional options for the pet (e.g., "tamed", "size:2").doubleThe price to purchase this pet in the main shop.
-
Element Details
-
description
String descriptionThe description shown in the shop GUI lore. If empty, defaults to "It's a {PetTypeName}!"- Returns:
- the shop lore, or an empty string for the generated default
- Default:
""
-
price
double priceThe price to purchase this pet in the main shop.- Returns:
- the purchase price in the main shop
- Default:
100.0
-
exp
double expThe starting experience for the purchased pet.- Returns:
- the experience the purchased pet starts with
- Default:
0.0
-
options
String[] optionsAdditional options for the pet (e.g., "tamed", "size:2"). For baby variants, "baby" is added automatically.- Returns:
- extra creation options applied to the purchased pet
- Default:
{}
-
displayName
String displayNameThe display name in the shop GUI. If empty, defaults to the pet type name with spaces (e.g., "ZombieVillager" → "Zombie Villager").- Returns:
- the shop display name, or an empty string for the generated default
- Default:
""
-
iconMaterial
String iconMaterialThe material name for the shop icon (e.g., "zombie_head"). If empty, uses the default icon based on the entity type.- Returns:
- the shop icon material, or an empty string for the type's default
- Default:
""
-
babyPrice
double babyPriceThe price for the baby variant in the babies shop. If -1, defaults to price * 2.- Returns:
- the baby variant's price, or
-1for twiceprice()
- Default:
-1.0
-