Package com.griefdefender.api.claim
Interface ClaimGroup.Builder
- Enclosing interface:
ClaimGroup
public static interface ClaimGroup.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns theClaimGroup.dateCreated(Instant dateCreated) The claim group creation date.description(net.kyori.adventure.text.Component description) TheComponentdescription of claim group.Gets the creation date of claim group.@Nullable net.kyori.adventure.text.ComponentGets the claim group descriptionComponent.getName()Gets the claim group nameGets theClaimGroupSyncMode.getType()Gets theClaimGroupType.Gets theUUIDassociated with group.@Nullable UUIDGets the user uuid this is associated with if any.Sets the claim group name.reset()Resets the builder to default settings.syncMode(ClaimGroupSyncMode mode) Sets theClaimGroupSyncMode.type(ClaimGroupType type) Sets theClaimGroupType.Sets the's UUID to assign this group to.invalid reference
UserSets theClaimGroup'sUUID.
-
Method Details
-
getUniqueId
UUID getUniqueId()- Returns:
- The claim group uuid
-
getName
String getName()Gets the claim group name- Returns:
- The claim group name
-
getDescription
@Nullable net.kyori.adventure.text.Component getDescription()Gets the claim group descriptionComponent.- Returns:
- The claim group description, if available
-
getDateCreated
Instant getDateCreated()Gets the creation date of claim group.- Returns:
- The claim group creation date
-
getType
ClaimGroupType getType()Gets theClaimGroupType.- Returns:
- The claim group type
-
getSyncMode
ClaimGroupSyncMode getSyncMode()Gets theClaimGroupSyncMode.- Returns:
- The claim group sync mode
-
getUserUniqueId
@Nullable UUID getUserUniqueId()Gets the user uuid this is associated with if any.- Returns:
- The user uuid, if available
-
uuid
Sets theClaimGroup'sUUID. Note: If not set, a new uuid will be generated.- Parameters:
uuid- The uuid to set- Returns:
- The builder
-
user
Sets the's UUID to assign this group to.invalid reference
User
Note: This is only required if type isClaimGroupTypes.USER.- Parameters:
userUniqueId- The user uuid- Returns:
- The builder
-
description
TheComponentdescription of claim group.- Parameters:
description- The description- Returns:
- The claim group description
-
dateCreated
The claim group creation date. Note: If not set, date will be set on build.- Parameters:
dateCreated- The claim group creation date- Returns:
- The builder
-
name
Sets the claim group name.- Parameters:
name- The claim group name- Returns:
- The builder
-
syncMode
Sets theClaimGroupSyncMode.- Parameters:
mode- The claim group sync mode.- Returns:
- The builder
-
type
Sets theClaimGroupType.- Parameters:
type- The claim group type- Returns:
- The builder
-
reset
ClaimGroup.Builder reset()Resets the builder to default settings.- Returns:
- The builder
-
build
ClaimGroup build()Returns theClaimGroup.- Returns:
- The claim group
-