Class FarmerManager

java.lang.Object
xyz.geik.farmer.api.managers.FarmerManager

public class FarmerManager extends Object
Farmer Manager class manages all farmer related methods.
Author:
poyrazinan
  • Field Details

  • Constructor Details

    • FarmerManager

      public FarmerManager()
      Constructor of class
  • Method Details

    • removeFarmer

      public boolean removeFarmer(String regionId)
      DANGER - Use with caution.

      Remove farmer from database and cache. Cannot be UNDONE.

      Parameters:
      regionId - Region id of farmer
      Returns:
      true if farmer was removed, false if not
    • changeOwner

      public void changeOwner(UUID oldOwner, UUID newOwner, String regionId)
      Changes owner of farmer.
      Parameters:
      oldOwner - Old owner of farmer
      newOwner - New owner of farmer
      regionId - Region id of farmer
    • hasFarmer

      public boolean hasFarmer(org.bukkit.Location location)
      Checks if farmer exists on location.
      Parameters:
      location - Location to check
      Returns:
      true if farmer exists, false if not
    • getUsers

      public Set<User> getUsers(String regionId)
      Finds user list of farmer from region id.
      Parameters:
      regionId - region id of farmer
      Returns:
      user set of farmer
      See Also:
    • getUsers

      public Set<User> getUsers(org.bukkit.Location location)
      Finds user list of farmer from location.
      Parameters:
      location - location of farmer region
      Returns:
      user set of farmer
      See Also: