Class PetsManager

java.lang.Object
com.storytimeproductions.stweaks.util.PetsManager

public class PetsManager extends Object
Manages the loading and retrieval of pets from the pets.yml configuration file. This class handles parsing the configuration, validating pet data, and providing access to the loaded pets.
  • Constructor Details

    • PetsManager

      public PetsManager(org.bukkit.plugin.java.JavaPlugin plugin)
      Constructs a PetsManager instance.
      Parameters:
      plugin - The main plugin instance.
  • Method Details

    • getPetByItem

      public Pet getPetByItem(org.bukkit.inventory.ItemStack item)
      Returns the Pet corresponding to the given item if it has a hotbar_pets model, or null otherwise.
    • loadPets

      public void loadPets()
      Loads pets from the pets.yml configuration file.
    • getPetById

      public Pet getPetById(String petId)
      Retrieves a Pet by its ID.
      Parameters:
      petId - The ID of the pet to retrieve.
      Returns:
      The Pet object if found, otherwise null.
    • getAllPets

      public List<Pet> getAllPets()