Interface Sniffer
- All Superinterfaces:
Ageable, Animals, Attributable, Breedable, CommandSender, Creature, Damageable, Entity, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator
Represents a Sniffer.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents the current state of the Sniffer.Nested classes/interfaces inherited from interface Entity
Entity.Spigot -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExploredLocation(Location location) Add a location to the explored locations.booleancanDig()Gets whether the sniffer can dig in the currentLocationbelow 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.voidremoveExploredLocation(Location location) Remove a location of the explored locations.voidsetState(Sniffer.State state) Set a new state for the sniffer.Methods inherited from interface Animals
getBreedCause, getLoveModeTicks, isBreedItem, isBreedItem, isLoveMode, setBreedCause, setLoveModeTicksMethods inherited from interface Attributable
getAttributeMethods inherited from interface Breedable
canBreed, getAgeLock, setAgeLock, setBreedMethods inherited from interface CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from interface Damageable
damage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealthMethods inherited from interface Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, 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, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, 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, teleportMethods inherited from interface Leashable
getLeashHolder, isLeashed, setLeashHolderMethods inherited from interface LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, canBreatheUnderwater, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHurtSound, getItemInUse, getItemInUseTicks, getKiller, getLastDamage, getLastTwoTargetBlocks, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getWaypointColor, getWaypointStyle, hasAI, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isRiptiding, isSleeping, isSwimming, playHurtAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setCanPickupItems, setCollidable, setGliding, setInvisible, setItemInUseTicks, setLastDamage, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setRiptiding, setSwimming, setWaypointColor, setWaypointStyle, swingMainHand, swingOffHandMethods inherited from interface Lootable
getLootTable, getSeed, setLootTable, setSeedMethods inherited from interface Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface Nameable
getCustomName, setCustomNameMethods inherited from interface Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentMethods inherited from interface PersistentDataHolder
getPersistentDataContainerMethods inherited from interface ProjectileSource
launchProjectile, launchProjectileMethods inherited from interface 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
-
canDig
boolean canDig()Gets whether the sniffer can dig in the currentLocationbelow its head.- Returns:
trueif can dig orfalseotherwise
-