Class User

java.lang.Object
xyz.geik.farmer.model.user.User

public class User extends Object
User Object which farmer has
  • Constructor Summary

    Constructors
    Constructor
    Description
    User(int farmerId, String name, UUID uuid, FarmerPerm perm)
    Constructor of User
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    getUserAmount(org.bukkit.entity.Player player)
    How many user can player add to farmer.
    static void
    updateRole(UUID uuid, int roleId, int farmerId)
    Updates player role on database created for #updateUserRole but can be required in another class if necessary.
    static boolean
    updateUserRole(@NotNull User user, Farmer farmer)
    Change role of user coop to member or member to coop.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • User

      public User(int farmerId, String name, UUID uuid, FarmerPerm perm)
      Constructor of User
      Parameters:
      farmerId - id of farmer
      name - of user
      uuid - of user
      perm - of user FarmerPerm object
  • Method Details

    • updateUserRole

      public static boolean updateUserRole(@NotNull @NotNull User user, Farmer farmer)
      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 farmer
      farmer - of region
      Returns:
      boolean of update status
    • updateRole

      public static void updateRole(UUID uuid, int roleId, int farmerId)
      Updates player role on database created for #updateUserRole but can be required in another class if necessary.
      Parameters:
      uuid - of user
      roleId - role id of FarmerPerm
      farmerId - 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