Interface SecurityPolicyContainerItem
- All Known Implementing Classes:
FallbackSecurityCardItem
,SecurityCardItem
@API(status=STABLE,
since="2.0.0-milestone.3.5")
public interface SecurityPolicyContainerItem
Represents an item that can contain a
SecurityPolicy
. Typically, a Security Card.-
Method Summary
Modifier and TypeMethodDescriptiongetActor
(net.minecraft.world.item.ItemStack stack) long
getPolicy
(net.minecraft.world.item.ItemStack stack) Returns aSecurityPolicy
containing all the permissions that thisSecurityPolicyContainerItem
permits.boolean
isValid
(net.minecraft.world.item.ItemStack stack)
-
Method Details
-
isValid
boolean isValid(net.minecraft.world.item.ItemStack stack) -
getActor
-
getPolicy
Returns aSecurityPolicy
containing all the permissions that thisSecurityPolicyContainerItem
permits. It is important to have all the relevant permissions in theSecurityPolicy
, even the ones that are "allowed by default" viaPlatformPermission.isAllowedByDefault()
. If not, even a permission that is allowed by default will not be allowed.- Parameters:
stack
- the stack- Returns:
- the policy, if present
-
getEnergyUsage
long getEnergyUsage()
-