Package org.bukkit.entity
Interface Sniffer
- All Superinterfaces:
Ageable
,Animals
,Attributable
,Breedable
,CommandSender
,Creature
,Damageable
,Entity
,LivingEntity
,Lootable
,Metadatable
,Mob
,Nameable
,Permissible
,PersistentDataHolder
,ProjectileSource
,ServerOperator
Represents a Sniffer.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents the current state of the Sniffer.Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExploredLocation
(Location location) Add a location to the explored locations.boolean
canDig()
Gets whether the sniffer can dig in the currentLocation
below its head.Try to get a possible location where the sniffer can dig.Gets the locations explored by the sniffer.getState()
Get the current state of the sniffer.void
removeExploredLocation
(Location location) Remove a location of the explored locations.void
setState
(Sniffer.State state) Set a new state for the sniffer.Methods inherited from interface org.bukkit.entity.Ageable
getAge, isAdult, setAdult, setAge, setBaby
Methods inherited from interface org.bukkit.entity.Animals
getBreedCause, getLoveModeTicks, isBreedItem, isBreedItem, isLoveMode, setBreedCause, setLoveModeTicks
Methods inherited from interface org.bukkit.attribute.Attributable
getAttribute
Methods inherited from interface org.bukkit.entity.Breedable
canBreed, getAgeLock, setAgeLock, setBreed
Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
Methods inherited from interface org.bukkit.entity.Damageable
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, canBreatheUnderwater, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHurtSound, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, hasAI, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isLeashed, isRiptiding, isSleeping, isSwimming, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setCanPickupItems, setCollidable, setGliding, setInvisible, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setSwimming, swingMainHand, swingOffHand
Methods inherited from interface org.bukkit.loot.Lootable
getLootTable, getSeed, setLootTable, setSeed
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.entity.Mob
getAmbientSound, getTarget, isAware, setAware, setTarget
Methods inherited from interface org.bukkit.Nameable
getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
getExploredLocations
Gets the locations explored by the sniffer.
Note: the returned locations use sniffer's current world.- Returns:
- a collection of locations
-
removeExploredLocation
Remove a location of the explored locations.
Note: the location must be in the sniffer's current world for this method to have any effect.- Parameters:
location
- the location to remove- See Also:
-
addExploredLocation
Add a location to the explored locations.
Note: the location must be in the sniffer's current world for this method to have any effect.- Parameters:
location
- the location to add- See Also:
-
getState
Get the current state of the sniffer.- Returns:
- the state of the sniffer
-
setState
Set a new state for the sniffer.
This will also make the sniffer make the transition to the new state.- Parameters:
state
- the new state
-
findPossibleDigLocation
Try to get a possible location where the sniffer can dig.- Returns:
- a
Location
if found or null
-
canDig
boolean canDig()Gets whether the sniffer can dig in the currentLocation
below its head.- Returns:
true
if can dig orfalse
otherwise
-