Table of Contents

Struct BlockEntity.CachedAccessPerms

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Access permissions cache for a specific block for a specific player. Used in packet handling to not have to duplicate work if multiple handlers are interested in validation.

public struct BlockEntity.CachedAccessPerms
Inherited Members
Extension Methods

Remarks

Proper use of this (passdown into handlers) will be introduced in the next version.

Constructors

CachedAccessPerms(IWorldAccessor, BlockPos, IPlayer)

[Obsolete("This signature will change in 1.23. Avoid it for now.")]
public CachedAccessPerms(IWorldAccessor world, BlockPos blockPos, IPlayer player)

Parameters

world IWorldAccessor
blockPos BlockPos
player IPlayer

Fields

GrantedFlags

public EnumBlockAccessFlags GrantedFlags

Field Value

EnumBlockAccessFlags

Reachable

public BlockEntity.CachedAccessPerms.EnumReachability Reachable

Field Value

BlockEntity.CachedAccessPerms.EnumReachability

TestedFlags

public EnumBlockAccessFlags TestedFlags

Field Value

EnumBlockAccessFlags

Methods

IsInteractingPlayerAllowedTo(EnumBlockAccessFlags, bool, string)

Test for permissions and log an audit message if the permission is not given.

public bool IsInteractingPlayerAllowedTo(EnumBlockAccessFlags accessToCheck, bool validatePickRange, string thingNameForLog)

Parameters

accessToCheck EnumBlockAccessFlags
validatePickRange bool
thingNameForLog string

Returns

bool