public class Context extends java.lang.Object implements IContext
Modifier and Type | Field and Description |
---|---|
private java.util.Map<ContextKey<?>,java.lang.Object> |
map |
Constructor and Description |
---|
Context() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
covers(ContextKey<?> key) |
<T> T |
get(ContextKey<T> key) |
EntityPlayer |
getPlayer() |
World |
getWorld()
World from where permission is requested.
|
boolean |
has(ContextKey<?> key) |
<T> Context |
set(ContextKey<T> key,
T obj)
Sets Context object
|
private java.util.Map<ContextKey<?>,java.lang.Object> map
@Nullable public World getWorld()
IContext
@Nullable public EntityPlayer getPlayer()
@Nullable public <T> T get(ContextKey<T> key)
public boolean has(ContextKey<?> key)
public <T> Context set(ContextKey<T> key, @Nullable T obj)
key
- Context keyobj
- Context object. Can be nullprotected boolean covers(ContextKey<?> key)