Package com.griefdefender.api.event
Interface PermissionIdentifyEvent
- All Superinterfaces:
ClaimEvent,Event
Represents an event that is called before GD processes an identifier for an event object.
For example, if a minecraft horse is the event object, GD would return 'minecraft:horse'.
However, if a plugin has modified horses then it could override this identifier and return
its own id in the format of 'pluginid:name'.
Plugins can use this event to alter id's for objects it owns.
-
Method Summary
Modifier and TypeMethodDescriptionGets the mutable context set associated with permission object.The final identifier for permission object processed in event manager.Gets the permission action location.The original identifier for permission object processed in event manager.Gets the permission object such as a block, entity, or item usually associated with an event.@Nullable UsergetUser()Gets theUserassociated with permission object.booleanisSource()Whether permission object is source.voidSets a new identifier replacing the original.Methods inherited from interface com.griefdefender.api.event.ClaimEvent
getClaim, getClaims, getMessage, getSource, getSourceUser, setMessage
-
Method Details
-
getOriginalIdentifier
String getOriginalIdentifier()The original identifier for permission object processed in event manager. For example, if a vanilla pig was being processed, this would return 'minecraft:pig'.- Returns:
- The original permission object identifier
-
getFinalIdentifier
String getFinalIdentifier()The final identifier for permission object processed in event manager. In order to- Returns:
- The original permission object identifier
-
getContexts
Gets the mutable context set associated with permission object.- Returns:
- The mutable context set.
-
getPermissionObject
Object getPermissionObject()Gets the permission object such as a block, entity, or item usually associated with an event.- Returns:
- The permission object.
-
getUser
@Nullable User getUser()Gets theUserassociated with permission object.- Returns:
- The user, if available
-
getLocation
Object getLocation()Gets the permission action location.- Returns:
- The permission action location
-
setNewIdentifier
Sets a new identifier replacing the original.- Parameters:
id- The new identifier
-
isSource
boolean isSource()Whether permission object is source.- Returns:
- true if source, false if not
-