Interface IContext
-
- All Known Implementing Classes:
AreaContext
,BlockPosContext
,Context
,PlayerContext
,TargetContext
,WorldContext
public interface IContext
UseBlockPosContext
orPlayerContext
when possible
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
get(ContextKey<T> key)
PlayerEntity
getPlayer()
World
getWorld()
World from where permission is requested.boolean
has(ContextKey<?> key)
-
-
-
Method Detail
-
getWorld
@Nullable World getWorld()
World from where permission is requested. Can be null
-
getPlayer
@Nullable PlayerEntity getPlayer()
- Returns:
- Player requesting permission. Can be null
-
get
@Nullable <T> T get(ContextKey<T> key)
- Parameters:
key
- Context key- Returns:
- Context object
-
has
boolean has(ContextKey<?> key)
- Parameters:
key
- Context key- Returns:
- true if context contains this key
-
-