Package com.griefdefender.api.event
Interface ProcessTrustUserEvent
- All Superinterfaces:
net.kyori.event.Cancellable,ClaimEvent,Event,TrustClaimEvent
Represents an event that is called before GD processes a player's trust.
This event allows a plugin to override a player's trust based on it's needs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.griefdefender.api.event.TrustClaimEvent
TrustClaimEvent.Add, TrustClaimEvent.Remove -
Method Summary
Modifier and TypeMethodDescriptionThe final trust result forUser.@Nullable ObjectGets the trust action location.The original trust result forUser.getUser()Gets theUsertrust targetvoidsetNewTrustResult(TrustResult result) Sets a new trust result forUserreplacing the original.Methods inherited from interface net.kyori.event.Cancellable
cancelled, cancelledMethods inherited from interface com.griefdefender.api.event.ClaimEvent
getClaim, getClaims, getMessage, getSource, getSourceUser, setMessageMethods inherited from interface com.griefdefender.api.event.TrustClaimEvent
getTrustType
-
Method Details
-
getOriginalTrustResult
TrustResult getOriginalTrustResult()The original trust result forUser.- Returns:
- The original trust result
-
getFinalTrustResult
TrustResult getFinalTrustResult()The final trust result forUser. Note: If not changed, this will be same as original result.- Returns:
- The final trust result
-
getUser
User getUser()Gets theUsertrust target- Returns:
- The user trust target
-
getLocation
@Nullable Object getLocation()Gets the trust action location.
Note: This is only available during flag permission checks.- Returns:
- The trust action location, if available
-
setNewTrustResult
Sets a new trust result forUserreplacing the original.- Parameters:
result- The new trust result
-