public class ProtectionQuery extends Object
| Constructor and Description |
|---|
ProtectionQuery() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
testBlockBreak(Object cause,
org.bukkit.block.Block block)
Test whether a block can be broken.
|
boolean |
testBlockInteract(Object cause,
org.bukkit.block.Block block)
Test whether a block can be interacted with.
|
boolean |
testBlockPlace(Object cause,
org.bukkit.Location location,
org.bukkit.Material newMaterial)
Test whether a block can be placed at a given location.
|
boolean |
testEntityDamage(Object cause,
org.bukkit.entity.Entity entity)
Test whether an entity can be damaged.
|
boolean |
testEntityDestroy(Object cause,
org.bukkit.entity.Entity entity)
Test whether an entity can be destroyed.
|
boolean |
testEntityInteract(Object cause,
org.bukkit.entity.Entity entity)
Test whether an entity can be interacted with.
|
boolean |
testEntityPlace(Object cause,
org.bukkit.Location location,
org.bukkit.entity.EntityType type)
Test whether an entity can be placed.
|
public boolean testBlockPlace(@Nullable Object cause, org.bukkit.Location location, org.bukkit.Material newMaterial)
The cause does not have to be a player. It can be null
if the cause is not known, although the checks will executed
assuming that the actor is a non-member of all regions.
cause - the cause, which can be a block, an entity, or a player, or null if unknownlocation - the location of the blocknewMaterial - the new materialpublic boolean testBlockBreak(@Nullable Object cause, org.bukkit.block.Block block)
The cause does not have to be a player. It can be null
if the cause is not known, although the checks will executed
assuming that the actor is a non-member of all regions.
cause - the cause, which can be a block, an entity, or a player, or null if unknownblock - the block brokenpublic boolean testBlockInteract(@Nullable Object cause, org.bukkit.block.Block block)
The cause does not have to be a player. It can be null
if the cause is not known, although the checks will executed
assuming that the actor is a non-member of all regions.
cause - the cause, which can be a block, an entity, or a player, or null if unknownblock - the block that is interacted withpublic boolean testEntityPlace(@Nullable Object cause, org.bukkit.Location location, org.bukkit.entity.EntityType type)
The cause does not have to be a player. It can be null
if the cause is not known, although the checks will executed
assuming that the actor is a non-member of all regions.
cause - the cause, which can be a block, an entity, or a player, or null if unknownlocation - the location that the entity will be spawned attype - the type that is to be spawnedpublic boolean testEntityDestroy(@Nullable Object cause, org.bukkit.entity.Entity entity)
The cause does not have to be a player. It can be null
if the cause is not known, although the checks will executed
assuming that the actor is a non-member of all regions.
cause - the cause, which can be a block, an entity, or a player, or null if unknownentity - the entity brokenpublic boolean testEntityInteract(@Nullable Object cause, org.bukkit.entity.Entity entity)
The cause does not have to be a player. It can be null
if the cause is not known, although the checks will executed
assuming that the actor is a non-member of all regions.
cause - the cause, which can be a block, an entity, or a player, or null if unknownentity - the entity interacted withpublic boolean testEntityDamage(@Nullable Object cause, org.bukkit.entity.Entity entity)
The cause does not have to be a player. It can be null
if the cause is not known, although the checks will executed
assuming that the actor is a non-member of all regions.
cause - the cause, which can be a block, an entity, or a player, or null if unknownentity - the entity damagedCopyright © 2015. All Rights Reserved.