Class Pet

java.lang.Object
com.storytimeproductions.models.Pet

public class Pet extends Object
Represents a custom pet in the plugin, which includes metadata such as a subtitle, special perk behavior, sound effects, quotes, required food, and a crafting recipe.

Instances of this class are loaded and managed by the PetsManager.

  • Constructor Details

    • Pet

      public Pet(String id, String subtitle, String perk, List<String> burpSounds, List<String> quotes, org.bukkit.Material food, List<List<org.bukkit.Material>> recipe)
      Constructs a new Pet object with the provided attributes.
      Parameters:
      id - Unique string identifier for the pet (used as internal key).
      subtitle - Short description or subtitle of the pet (used for UI).
      perk - String representing the effect or item bonus this pet provides. Format is either "effect:'effect_name':'duration'" or "item:'item_name':'amount'".
      burpSounds - List of custom sound names the pet may play randomly. Format should be like "storytime:'sound_id'".
      quotes - List of fun or thematic quotes that the pet may say at intervals.
      food - The material that must be present in a player's inventory for the perk to activate.
      recipe - 3x3 crafting matrix representing the materials used to craft this pet.
  • Method Details

    • getId

      public String getId()
      Returns the unique identifier of the pet.
      Returns:
      pet ID
    • getSubtitle

      public String getSubtitle()
      Returns the subtitle or description of the pet.
      Returns:
      pet subtitle
    • getPerk

      public String getPerk()
      Returns the perk string that defines what the pet does. Example: "effect:speed:200" or "item:gold_ingot:1"
      Returns:
      perk definition string
    • getBurpSounds

      public List<String> getBurpSounds()
      Returns the list of sound effect names this pet may randomly play.
      Returns:
      list of sound names
    • getQuotes

      public List<String> getQuotes()
      Returns the list of quotes the pet may say at random intervals.
      Returns:
      list of pet quotes
    • getFood

      public org.bukkit.Material getFood()
      Returns the food item required for the pet's perk to activate.
      Returns:
      Material representing the required food
    • getRecipe

      public List<List<org.bukkit.Material>> getRecipe()
      Returns the crafting recipe as a 3x3 matrix of materials. Each inner list represents a row in the crafting grid.
      Returns:
      crafting recipe matrix
    • sendRandomPetMessage

      public void sendRandomPetMessage(org.bukkit.entity.Player player)
      Sends a random quote as a message and plays a random sound from burpSounds for the player.
      Parameters:
      player - The player to send the message to and play the sound for.