Delegate CanPlaceOrBreakDelegate
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Test if a player has the privilege to modify a block at given block selection
public delegate bool CanPlaceOrBreakDelegate(IServerPlayer byPlayer, BlockSelection blockSel, out string claimant)
Parameters
byPlayer
IServerPlayerblockSel
BlockSelectionclaimant
stringNeeds to be set when false is returned. Is used to display the reason why the placement was denied. Either it needs to be the name of a player/npc who owns this block, or it needs to be prefixed with custommessage- for a custom error message, e.g. "custommessage-nobuildprivilege": "No build privilege"
Returns
- bool
False to deny placement
- Extension Methods