Package org.bukkit.entity
Interface FishHook
- All Superinterfaces:
- CommandSender,- Entity,- Metadatable,- Nameable,- Permissible,- PersistentDataHolder,- Projectile,- ServerOperator
Represents a fishing hook.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classRepresents a state in which a fishing hook may be.Nested classes/interfaces inherited from interface org.bukkit.entity.EntityEntity.Spigot
- 
Method SummaryModifier and TypeMethodDescriptionbooleanGet whether the lure enchantment should be applied to reduce the wait time.doubleDeprecated.has no effect in newer Minecraft versionsGet the entity hooked by this fish hook.intGet the maximum number of ticks one has to wait for a fish biting.intGet the minimum number of ticks one has to wait for a fish biting.getState()Get the current state of this fish hook.booleanCheck whether or not this fish hook is in open water.booleanPull the hooked entity to the caster of this fish hook.voidsetApplyLure(boolean applyLure)Set whether the lure enchantment should be applied to reduce the wait time.voidsetBiteChance(double chance)Deprecated.has no effect in newer Minecraft versionsvoidsetHookedEntity(Entity entity)Set the entity hooked by this fish hook.voidsetMaxWaitTime(int maxWaitTime)Set the maximum number of ticks one has to wait for a fish biting.voidsetMinWaitTime(int minWaitTime)Set the minimum number of ticks one has to wait for a fish biting.Methods inherited from interface org.bukkit.command.CommandSendergetName, sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from interface org.bukkit.entity.EntityaddPassenger, addScoreboardTag, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isOnGround, isPersistent, isSilent, isValid, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisualFire, spigot, teleport, teleport, teleport, teleportMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.NameablegetCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.PermissibleaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainerMethods inherited from interface org.bukkit.entity.ProjectiledoesBounce, getShooter, setBounce, setShooterMethods inherited from interface org.bukkit.permissions.ServerOperatorisOp, setOp
- 
Method Details- 
getMinWaitTimeint getMinWaitTime()Get the minimum number of ticks one has to wait for a fish biting.The default is 100 ticks (5 seconds). 
 Note that this is before applying lure.- Returns:
- Minimum number of ticks one has to wait for a fish biting
 
- 
setMinWaitTimevoid setMinWaitTime(int minWaitTime)Set the minimum number of ticks one has to wait for a fish biting.The default is 100 ticks (5 seconds). 
 Note that this is before applying lure.- Parameters:
- minWaitTime- Minimum number of ticks one has to wait for a fish biting
 
- 
getMaxWaitTimeint getMaxWaitTime()Get the maximum number of ticks one has to wait for a fish biting.The default is 600 ticks (30 seconds). 
 Note that this is before applying lure.- Returns:
- Maximum number of ticks one has to wait for a fish biting
 
- 
setMaxWaitTimevoid setMaxWaitTime(int maxWaitTime)Set the maximum number of ticks one has to wait for a fish biting.The default is 600 ticks (30 seconds). 
 Note that this is before applying lure.- Parameters:
- maxWaitTime- Maximum number of ticks one has to wait for a fish biting
 
- 
getApplyLureboolean getApplyLure()Get whether the lure enchantment should be applied to reduce the wait time.The default is true. 
 Lure reduces the wait time by 100 ticks (5 seconds) for each level of the enchantment.- Returns:
- Whether the lure enchantment should be applied to reduce the wait time
 
- 
setApplyLurevoid setApplyLure(boolean applyLure)Set whether the lure enchantment should be applied to reduce the wait time.The default is true. 
 Lure reduces the wait time by 100 ticks (5 seconds) for each level of the enchantment.- Parameters:
- applyLure- Whether the lure enchantment should be applied to reduce the wait time
 
- 
getBiteChanceDeprecated.has no effect in newer Minecraft versionsGets the chance of a fish biting.0.0 = No Chance. 
 1.0 = Instant catch.- Returns:
- chance the bite chance
 
- 
setBiteChanceDeprecated.has no effect in newer Minecraft versionsSets the chance of a fish biting.0.0 = No Chance. 
 1.0 = Instant catch.- Parameters:
- chance- the bite chance
- Throws:
- IllegalArgumentException- if the bite chance is not between 0 and 1
 
- 
isInOpenWaterboolean isInOpenWater()Check whether or not this fish hook is in open water.Open water is defined by a 5x4x5 area of water, air and lily pads. If in open water, treasure items may be caught. - Returns:
- true if in open water, false otherwise
 
- 
getHookedEntityGet the entity hooked by this fish hook.- Returns:
- the hooked entity. null if none
 
- 
setHookedEntitySet the entity hooked by this fish hook.- Parameters:
- entity- the entity to set, or null to unhook
 
- 
pullHookedEntityboolean pullHookedEntity()Pull the hooked entity to the caster of this fish hook. If no entity is hooked, this method has no effect.- Returns:
- true if pulled, false if no entity is hooked
 
- 
getStateGet the current state of this fish hook.- Returns:
- the fish hook state
 
 
-