Package xyz.geik.farmer.model.user
Enum FarmerPerm
- All Implemented Interfaces:
Serializable
,Comparable<FarmerPerm>
,java.lang.constant.Constable
Enum class of farmer permission of user
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Gets name of rolestatic FarmerPerm
getRole
(int id) Gets role of farmer by int idstatic FarmerPerm
getRoleByName
(String name) Gets role by stringstatic int
getRoleId
(@NotNull FarmerPerm perm) Gets int id of rolestatic FarmerPerm
Returns the enum constant of this type with the specified name.static FarmerPerm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
COOP
COOP perm of farmer -
MEMBER
MEMBER perm of player -
OWNER
OWNER perm of farmer
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
Gets name of role- Returns:
- name of role
-
getRole
Gets role of farmer by int id- Parameters:
id
- of role- Returns:
- FarmerPerm object
-
getRoleByName
Gets role by string- Parameters:
name
- of role- Returns:
- FarmerPerm object
-
getRoleId
Gets int id of role- Parameters:
perm
- of farmer- Returns:
- int of FarmerPerm object
-