Package com.griefdefender.api
Interface CommandResult
public interface CommandResult
Contains the command result data of a command sender permission check.
-
Method Summary
Modifier and TypeMethodDescriptiongetClaim()Gets theClaimassociated with command.Gets the command location.Optional<net.kyori.adventure.text.Component> Gets the result message.Gets the player that ran command.getUser()Gets theUserassociated with command.booleanisAdmin()Checks if command sender is admin.booleanChecks if command sender can run command.
-
Method Details
-
getClaim
Claim getClaim()Gets theClaimassociated with command.- Returns:
- The claim
-
getLocation
Object getLocation()Gets the command location.- Returns:
- The command location
-
getUser
User getUser()Gets theUserassociated with command.- Returns:
- The user
-
getPlayerSource
Object getPlayerSource()Gets the player that ran command.- Returns:
- The player source, if available
-
getMessage
Optional<net.kyori.adventure.text.Component> getMessage()Gets the result message.- Returns:
- The result message, if available
-
isAdmin
boolean isAdmin()Checks if command sender is admin.- Returns:
- true if admin, false if not
-
successful
boolean successful()Checks if command sender can run command.- Returns:
- true if allowed, false if not
-