You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProtectionManager contains many useful protection methods, take look here to get to know them.
For example, if you would want to know if player can break a block in a given location, you could you the following code:
ProtectionResult result = protectionManager.canBreak(blockSnapshot, player, shouldNotify); // shouldNotify tells the protection system to send player a message about not having access to given block
if (result.hasAccess()) {
// player can break this block! :D
} else {
// player cannot break this block :(
}