Package com.griefdefender.api.permission
Class Context
java.lang.Object
com.griefdefender.api.permission.Context
The context that a given service check occurs in.
Instances of a context are designed to function as cache keys, meaning they should be fairly lightweight and not hold references to large objects.
Contexts consist of a "type" (or key) and a "name" (or value).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Context
Create a new context instance.- Parameters:
type- Context type. Must not be null.name- Context name. Must not be null.
-
-
Method Details
-
getType
Gets the context type.For example, if the context represented a world, the type would be
world- Returns:
- The type of item this context represents
-
getName
Gets the context name.For example, if the context represented a world, the name would be the name of the world.
- Returns:
- The specific name of the item involved in this context
-
getKey
-
getValue
-
setValue
-
equals
-
hashCode
public int hashCode() -
toString
-