Package xyz.geik.farmer.model.user
Class User
java.lang.Object
xyz.geik.farmer.model.user.User
User Object which farmer has
-
Constructor Summary
ConstructorsConstructorDescriptionUser(int farmerId, String name, UUID uuid, FarmerPerm perm) Constructor of User -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetUserAmount(org.bukkit.entity.Player player) How many user can player add to farmer.static voidupdateRole(UUID uuid, int roleId, int farmerId) Updates player role on database created for #updateUserRole but can be required in another class if necessary.static booleanupdateUserRole(@NotNull User user, Farmer farmer) Change role of user coop to member or member to coop.
-
Constructor Details
-
User
Constructor of User- Parameters:
farmerId- id of farmername- of useruuid- of userperm- of user FarmerPerm object
-
-
Method Details
-
updateUserRole
Change role of user coop to member or member to coop. Synchronized method because this can be issue if owner spam role changes.- Parameters:
user- of farmerfarmer- of region- Returns:
- boolean of update status
-
updateRole
Updates player role on database created for #updateUserRole but can be required in another class if necessary.- Parameters:
uuid- of userroleId- role id of FarmerPermfarmerId- id of farmer
-
getUserAmount
public static int getUserAmount(org.bukkit.entity.Player player) How many user can player add to farmer.- Parameters:
player- to check player perm- Returns:
- amount of can add
-