Package xyz.geik.farmer.api.managers
Class FarmerManager
java.lang.Object
xyz.geik.farmer.api.managers.FarmerManager
Farmer Manager class manages all farmer related methods.
- Author:
- poyrazinan
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeOwner
(UUID oldOwner, UUID newOwner, String regionId) Changes owner of farmer.Finds user list of farmer from region id.getUsers
(org.bukkit.Location location) Finds user list of farmer from location.boolean
hasFarmer
(org.bukkit.Location location) Checks if farmer exists on location.boolean
removeFarmer
(String regionId) DANGER - Use with caution.
-
Field Details
-
farmers
Loaded farmer cache.- See Also:
-
-
Constructor Details
-
FarmerManager
public FarmerManager()Constructor of class
-
-
Method Details
-
removeFarmer
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
Changes owner of farmer.- Parameters:
oldOwner
- Old owner of farmernewOwner
- New owner of farmerregionId
- 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
Finds user list of farmer from region id.- Parameters:
regionId
- region id of farmer- Returns:
- user set of farmer
- See Also:
-
getUsers
Finds user list of farmer from location.- Parameters:
location
- location of farmer region- Returns:
- user set of farmer
- See Also:
-