Package com.griefdefender.api.event
Interface ClaimEvent
- All Superinterfaces:
Event
- All Known Subinterfaces:
AttackPlayerEvent,BorderClaimEvent,ChangeClaimEvent,ChangeClaimEvent.DisplayName,ChangeClaimEvent.Identifier,ChangeClaimEvent.Resize,ChangeClaimEvent.Type,ClanTrustClaimEvent,ClanTrustClaimEvent.Add,ClanTrustClaimEvent.Remove,CreateClaimEvent,CreateClaimEvent.Post,CreateClaimEvent.Pre,GroupTrustClaimEvent,GroupTrustClaimEvent.Add,GroupTrustClaimEvent.Remove,LoadClaimEvent,LoadClaimEvent.Post,LoadClaimEvent.Pre,PermissionIdentifyEvent,ProcessInteractBlockEvent,ProcessTrustUserEvent,RemoveClaimEvent,RemoveClaimEvent.Abandon,RemoveClaimEvent.Delete,RemoveClaimEvent.Expire,RentClaimEvent,SaveClaimEvent,SaveClaimEvent.Post,SaveClaimEvent.Pre,TaxClaimEvent,TransferClaimEvent,TrustClaimEvent,TrustClaimEvent.Add,TrustClaimEvent.Remove,UserTrustClaimEvent,UserTrustClaimEvent.Add,UserTrustClaimEvent.Remove
Base event when one or more
Claims are affected.-
Method Summary
Modifier and TypeMethodDescriptiondefault ClaimgetClaim()Gets the first claim.Gets the immutable list of claims.Optional<net.kyori.adventure.text.Component> Gets the claim message.The source object that caused this event.@Nullable UserThe sourceUserthat caused this event.voidsetMessage(net.kyori.adventure.text.Component message) Sets the claim message to be presented toif applicable.invalid reference
Subject
-
Method Details
-
getSource
Object getSource()The source object that caused this event.
Note: If no source available, pass mod/plugin instance.- Returns:
- The source
-
getSourceUser
@Nullable User getSourceUser()The sourceUserthat caused this event.- Returns:
- The source user, if available
-
getClaims
Gets the immutable list of claims.- Returns:
- The immutable list of claims
-
getClaim
Gets the first claim. Note: This is a helper method for events that will usually always contain one claim instead of callinggetClaims().- Returns:
- The first claim
-
setMessage
void setMessage(net.kyori.adventure.text.Component message) Sets the claim message to be presented toif applicable.invalid reference
Subject- Parameters:
message- The message
-
getMessage
Optional<net.kyori.adventure.text.Component> getMessage()Gets the claim message. Note: This is only available if event was cancelled.- Returns:
- The claim message, if available
-