Table of Contents

Struct Entity.CachedAccessPerms

Namespace
Vintagestory.API.Common.Entities
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 Entity.CachedAccessPerms
Inherited Members
Extension Methods

Remarks

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

Constructors

CachedAccessPerms(Entity, IPlayer)

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 CachedAccessPerms(Entity entity, IPlayer player)

Parameters

entity Entity
player IPlayer

Remarks

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

Fields

GrantedFlags

public EnumBlockAccessFlags GrantedFlags

Field Value

EnumBlockAccessFlags

Reachable

public Entity.CachedAccessPerms.EnumReachability Reachable

Field Value

Entity.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

These are block access flags that will be checked for the position the entity is located in.

validatePickRange bool
thingNameForLog string

Returns

bool