public class ProtectionQuery
extends java.lang.Object
| Constructor and Description |
|---|
ProtectionQuery() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
testBlockBreak(java.lang.Object cause,
org.bukkit.block.Block block)
Test whether a block can be broken.
|
boolean |
testBlockInteract(java.lang.Object cause,
org.bukkit.block.Block block)
Test whether a block can be interacted with.
|
boolean |
testBlockPlace(java.lang.Object cause,
org.bukkit.Location location,
org.bukkit.Material newMaterial)
Test whether a block can be placed at a given location.
|
boolean |
testEntityDamage(java.lang.Object cause,
org.bukkit.entity.Entity entity)
Test whether an entity can be damaged.
|
boolean |
testEntityDestroy(java.lang.Object cause,
org.bukkit.entity.Entity entity)
Test whether an entity can be destroyed.
|
boolean |
testEntityInteract(java.lang.Object cause,
org.bukkit.entity.Entity entity)
Test whether an entity can be interacted with.
|
boolean |
testEntityPlace(java.lang.Object cause,
org.bukkit.Location location,
org.bukkit.entity.EntityType type)
Test whether an entity can be placed.
|
public boolean testBlockPlace(@Nullable
java.lang.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
java.lang.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
java.lang.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
java.lang.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
java.lang.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
java.lang.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
java.lang.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 damaged