Query.Types
Constructor and Description |
---|
MobQuery(java.util.List<java.lang.Short> typeID,
java.util.List<org.bukkit.event.entity.EntityDamageEvent.DamageCause> deathCause,
java.util.List<java.lang.Integer> size,
java.util.List<java.lang.Boolean> spawner,
java.util.List<java.lang.Boolean> baby,
java.util.List<java.lang.Boolean> tamed,
java.util.List<java.lang.Boolean> playerKill) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static MobQuery |
fromAny()
Universal query.
|
static MobQuery |
fromAny(org.bukkit.entity.EntityType type)
Creates a query where NULL values match any possible value in that category.
|
static MobQuery |
fromAny(org.bukkit.entity.EntityType type,
org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
Creates a query where NULL values match any possible value in that category.
|
static MobQuery |
fromAny(org.bukkit.entity.EntityType type,
org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason,
java.lang.Boolean baby,
java.lang.Boolean tamed,
java.lang.Boolean playerKill)
Creates a query where NULL values match any possible value in that category.
|
static MobQuery |
fromAny(org.bukkit.entity.EntityType type,
org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause,
java.lang.Integer size,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason,
java.lang.Boolean baby,
java.lang.Boolean tamed,
java.lang.Boolean playerKill)
Creates a query where NULL values match any possible value in that category.
|
static MobQuery |
fromAny(java.lang.Short typeID,
org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause,
java.lang.Integer size,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason,
java.lang.Boolean baby,
java.lang.Boolean tamed,
java.lang.Boolean playerKill)
Creates a query where NULL values match any possible value in that category.
|
static MobQuery |
fromExact(org.bukkit.entity.EntityType type,
org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason,
java.lang.Boolean baby,
java.lang.Boolean tamed,
java.lang.Boolean playerKill)
Creates an exact query - where null values only match unspecified "any" queries - from the given
entity, spawn reason and killer.
|
static MobQuery |
fromExact(org.bukkit.entity.EntityType type,
org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause,
java.lang.Integer size,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason,
java.lang.Boolean baby,
java.lang.Boolean tamed,
java.lang.Boolean playerKill)
Creates an exact query - where null values only match unspecified "any" queries - from the given
entity, spawn reason and killer.
|
static MobQuery |
fromExact(org.bukkit.entity.LivingEntity entity,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason,
boolean playerKill)
Creates an exact query - where null values only match unspecified "any" queries - from the given
entity, spawn reason and killer.
|
static MobQuery |
fromExact(java.lang.Short typeID,
org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause,
java.lang.Integer size,
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason,
java.lang.Boolean baby,
java.lang.Boolean tamed,
java.lang.Boolean playerKill)
Creates an exact query - where null values only match unspecified "any" queries - from the given
entity, spawn reason and killer.
|
java.util.List<java.lang.Boolean> |
getBaby() |
java.util.List<org.bukkit.event.entity.EntityDamageEvent.DamageCause> |
getDeathCause() |
java.util.List<java.lang.Boolean> |
getPlayerKill() |
Query.Types |
getQueryType() |
java.util.List<java.lang.Integer> |
getSize() |
java.util.List<java.lang.Boolean> |
getSpawner() |
java.util.List<java.lang.Boolean> |
getTamed() |
java.util.List<java.lang.Short> |
getType() |
boolean |
hasBaby() |
boolean |
hasDeathCause() |
int |
hashCode() |
boolean |
hasPlayerKill() |
boolean |
hasSize() |
boolean |
hasSpawner() |
boolean |
hasTamed() |
boolean |
hasType() |
boolean |
match(Query other)
Determines if the given query matches the current query.
|
java.lang.String |
toString() |
public MobQuery(java.util.List<java.lang.Short> typeID, java.util.List<org.bukkit.event.entity.EntityDamageEvent.DamageCause> deathCause, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Boolean> spawner, java.util.List<java.lang.Boolean> baby, java.util.List<java.lang.Boolean> tamed, java.util.List<java.lang.Boolean> playerKill)
public static MobQuery fromAny()
public static MobQuery fromAny(org.bukkit.entity.EntityType type)
type
- - the unique type to search for, or NULL for all mob types.public static MobQuery fromAny(org.bukkit.entity.EntityType type, org.bukkit.event.entity.EntityDamageEvent.DamageCause cause)
type
- - the unique type to search for, or NULL for all mob types.cause
- - the damage type that killed the mob, or NULL for all damage types.public static MobQuery fromAny(org.bukkit.entity.EntityType type, org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, java.lang.Boolean baby, java.lang.Boolean tamed, java.lang.Boolean playerKill)
type
- - the unique type to search for, or NULL for all mob types.deathCause
- - the damage type that killed the mob, or NULL for all damage types.reason
- - the cause for spawning this mob, or NULL for all possible causes.baby
- - TRUE to match babies, FALSE to match adults, and NULL to match both.tamed
- - TRUE to matched tamed animals (wolfs), FALSE to match non-tamed or not-tamable, NULL for both.playerKill
- - TRUE to match mobs killed by players, FALSE to match mobs killed by anything else, NULL for both.public static MobQuery fromAny(org.bukkit.entity.EntityType type, org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause, java.lang.Integer size, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, java.lang.Boolean baby, java.lang.Boolean tamed, java.lang.Boolean playerKill)
type
- - the unique type to search for, or NULL for all mob types.deathCause
- - the damage type that killed the mob, or NULL for all damage types.size
- - size of the slime/magma cube, or NULL for all sizes (or mobs without different sizes).reason
- - the cause for spawning this mob, or NULL for all possible causes.baby
- - TRUE to match babies, FALSE to match adults, and NULL to match both.tamed
- - TRUE to matched tamed animals (wolfs), FALSE to match non-tamed or not-tamable, NULL for both.playerKill
- - TRUE to match mobs killed by players, FALSE to match mobs killed by anything else, NULL for both.public static MobQuery fromAny(java.lang.Short typeID, org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause, java.lang.Integer size, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, java.lang.Boolean baby, java.lang.Boolean tamed, java.lang.Boolean playerKill)
typeID
- - the unique type ID to search for, or NULL for all mob types.deathCause
- - the damage type that killed the mob, or NULL for all damage types.size
- - size of the slime/magma cube, or NULL for all sizes (or mobs without different sizes).reason
- - the cause for spawning this mob, or NULL for all possible causes.baby
- - TRUE to match babies, FALSE to match adults, and NULL to match both.tamed
- - TRUE to matched tamed animals (wolfs), FALSE to match non-tamed or not-tamable, NULL for both.playerKill
- - TRUE to match mobs killed by players, FALSE to match mobs killed by anything else, NULL for both.public static MobQuery fromExact(org.bukkit.entity.LivingEntity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, boolean playerKill)
entity
- - the entity to create from.reason
- - the action that spawned the given entity.playerKill
- - TRUE if this mob was killed by a player, FALSE if it was killed by anything else.public static MobQuery fromExact(org.bukkit.entity.EntityType type, org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, java.lang.Boolean baby, java.lang.Boolean tamed, java.lang.Boolean playerKill)
type
- - the entity type to search for.deathCause
- - the last damage to include in the search.reason
- - the action that spawned the given entity.baby
- - TRUE to search for babies, FALSE to search for adults.tamed
- - TRUE to search for tamed animals, FALSE for everything else.playerKill
- - TRUE to search for mobs killed by a player, FALSE for anything else.public static MobQuery fromExact(org.bukkit.entity.EntityType type, org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause, java.lang.Integer size, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, java.lang.Boolean baby, java.lang.Boolean tamed, java.lang.Boolean playerKill)
type
- - the entity type to search for.deathCause
- - the last damage to include in the search.size
- - the slime/magma cube size to search for.reason
- - the action that spawned the given entity.baby
- - TRUE to search for babies, FALSE to search for adults.tamed
- - TRUE to search for tamed animals, FALSE for everything else.playerKill
- - TRUE to search for mobs killed by a player, FALSE for anything else.public static MobQuery fromExact(java.lang.Short typeID, org.bukkit.event.entity.EntityDamageEvent.DamageCause deathCause, java.lang.Integer size, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, java.lang.Boolean baby, java.lang.Boolean tamed, java.lang.Boolean playerKill)
typeID
- - the unique entity type ID to search for.deathCause
- - the last damage to include in the search.size
- - the slime/magma cube size to search for.reason
- - the action that spawned the given entity.baby
- - TRUE to search for babies, FALSE to search for adults.tamed
- - TRUE to search for tamed animals, FALSE for everything else.playerKill
- - TRUE to search for mobs killed by a player, FALSE for anything else.public java.util.List<org.bukkit.event.entity.EntityDamageEvent.DamageCause> getDeathCause()
public java.util.List<java.lang.Short> getType()
public java.util.List<java.lang.Integer> getSize()
public java.util.List<java.lang.Boolean> getSpawner()
public java.util.List<java.lang.Boolean> getBaby()
public java.util.List<java.lang.Boolean> getTamed()
public java.util.List<java.lang.Boolean> getPlayerKill()
public boolean hasType()
public boolean hasDeathCause()
public boolean hasSize()
public boolean hasSpawner()
public boolean hasBaby()
public boolean hasTamed()
public boolean hasPlayerKill()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean match(Query other)
Query
If a query can be considered to be a subset of the universe of items, then this operation determines if the current set (A) has a non-empty intersection with the other set (B).
public java.lang.String toString()
toString
in class java.lang.Object
public Query.Types getQueryType()
getQueryType
in interface Query