Interface FishHook
- All Superinterfaces:
- Audience,- CommandSender,- Entity,- HoverEventSource<HoverEvent.ShowEntity>,- Metadatable,- Nameable,- Permissible,- PersistentDataHolder,- Pointered,- Projectile,- ServerOperator,- Sound.Emitter
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents 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.floatGet the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.intGet the maximum number of ticks one has to wait for a fish to bite after appearing.intGet the maximum number of ticks one has to wait for a fish appearing.floatGet the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.intGet the minimum number of ticks one has to wait for a fish to bite after appearing.intGet the minimum number of ticks one has to wait for a fish appearing.getState()Get the current state of this fish hook.intGet the number of ticks the hook needs to wait for a fish to bite.booleanCheck whether or not this fish hook is in open water.booleanWhether or not wait and lure time will be impacted by rain.booleanWhether or not wait and lure time will be impacted by direct sky access.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(@Nullable Entity entity) Set the entity hooked by this fish hook.voidsetLureAngle(float min, float max) Set both the minimum (default 0) and maximum (default 360) angle of where a fish will appear after the wait time.voidsetLureTime(int min, int max) Set both the minimum (default 20) and maximum (default 80) amount of ticks one has to wait for a fish to bite after appearing.voidsetMaxLureAngle(float maxLureAngle) Set the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.voidsetMaxLureTime(int maxLureTime) Set the maximum number of ticks one has to wait for a fish to bite after appearing.voidsetMaxWaitTime(int maxWaitTime) Set the maximum number of ticks one has to wait for a fish appearing.voidsetMinLureAngle(float minLureAngle) Set the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.voidsetMinLureTime(int minLureTime) Set the minimum number of ticks one has to wait for a fish to bite after appearing.voidsetMinWaitTime(int minWaitTime) Set the minimum number of ticks one has to wait for a fish appearing.voidsetRainInfluenced(boolean rainInfluenced) Set whether or not wait and lure time will be impacted by rain.voidsetSkyInfluenced(boolean skyInfluenced) Set whether or not wait and lure time will be impacted by direct sky access.voidsetWaitTime(int ticks) Sets the number of ticks the hook needs to wait for a fish to bite.voidsetWaitTime(int min, int max) Set both the minimum (default 100) and maximum (default 600) amount of ticks one has to wait for a fish appearing.Methods inherited from interface net.kyori.adventure.audience.AudienceclearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSendergetName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.EntityaddPassenger, addScoreboardTag, asHoverEvent, collidesAt, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface net.kyori.adventure.text.event.HoverEventSourceasHoverEventMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.NameablecustomName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.PermissibleaddAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainerMethods inherited from interface net.kyori.adventure.pointer.Pointeredget, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.entity.ProjectilecanHitEntity, doesBounce, getOwnerUniqueId, getShooter, hasBeenShot, hasLeftShooter, hitEntity, hitEntity, setBounce, setHasBeenShot, setHasLeftShooter, 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 appearing.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 appearing
 
- 
setMinWaitTimevoid setMinWaitTime(int minWaitTime) Set the minimum number of ticks one has to wait for a fish appearing.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 appearing
 
- 
getMaxWaitTimeint getMaxWaitTime()Get the maximum number of ticks one has to wait for a fish appearing.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 appearing
 
- 
setMaxWaitTimevoid setMaxWaitTime(int maxWaitTime) Set the maximum number of ticks one has to wait for a fish appearing.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 appearing
 
- 
setWaitTimevoid setWaitTime(int min, int max) Set both the minimum (default 100) and maximum (default 600) amount of ticks one has to wait for a fish appearing.- Parameters:
- min- minimum ticks for a fish to appear
- max- maximum ticks for a fish to appear
 
- 
getMinLureTimeint getMinLureTime()Get the minimum number of ticks one has to wait for a fish to bite after appearing.The default is 20 ticks (1 second). 
 Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- Returns:
- Minimum number of ticks one has to wait for a fish to bite
 
- 
setMinLureTimevoid setMinLureTime(int minLureTime) Set the minimum number of ticks one has to wait for a fish to bite after appearing.The default is 20 ticks (1 second). 
 Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- Parameters:
- minLureTime- Minimum number of ticks one has to wait for a fish to bite
 
- 
getMaxLureTimeint getMaxLureTime()Get the maximum number of ticks one has to wait for a fish to bite after appearing.The default is 80 ticks (4 second). 
 Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- Returns:
- Maximum number of ticks one has to wait for a fish to bite
 
- 
setMaxLureTimevoid setMaxLureTime(int maxLureTime) Set the maximum number of ticks one has to wait for a fish to bite after appearing.The default is 80 ticks (4 second). 
 Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- Parameters:
- maxLureTime- Maximum number of ticks one has to wait for a fish to bite
 
- 
setLureTimevoid setLureTime(int min, int max) Set both the minimum (default 20) and maximum (default 80) amount of ticks one has to wait for a fish to bite after appearing.- Parameters:
- min- minimum ticks to wait for a bite
- max- maximum ticks to wait for a bite
 
- 
getMinLureAnglefloat getMinLureAngle()Get the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 0 degrees. - Returns:
- Minimum angle of where a fish will appear
 
- 
setMinLureAnglevoid setMinLureAngle(float minLureAngle) Set the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 0 degrees. - Parameters:
- minLureAngle- Minimum angle of where a fish may appear
 
- 
getMaxLureAnglefloat getMaxLureAngle()Get the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 360 degrees. - Returns:
- Maximum angle of where a fish will appear
 
- 
setMaxLureAnglevoid setMaxLureAngle(float maxLureAngle) Set the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 360 degrees. - Parameters:
- maxLureAngle- Maximum angle of where a fish may appear
 
- 
setLureAnglevoid setLureAngle(float min, float max) Set both the minimum (default 0) and maximum (default 360) angle of where a fish will appear after the wait time. 0 degrees is positive Z, 90 degrees is negative X.- Parameters:
- min- minimum angle in degrees
- max- maximum angle in degrees
 
- 
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
 
- 
isSkyInfluencedboolean isSkyInfluenced()Whether or not wait and lure time will be impacted by direct sky access. True by default, causes a 50% time increase on average.- Returns:
- skylight access influences catch rate
 
- 
setSkyInfluencedvoid setSkyInfluenced(boolean skyInfluenced) Set whether or not wait and lure time will be impacted by direct sky access. True by default, causes a 50% time increase on average.- Parameters:
- skyInfluenced- if this hook is influenced by skylight access
 
- 
isRainInfluencedboolean isRainInfluenced()Whether or not wait and lure time will be impacted by rain. True by default, causes a 25% time decrease on average.- Returns:
- rain influences catch rate
 
- 
setRainInfluencedvoid setRainInfluenced(boolean rainInfluenced) Set whether or not wait and lure time will be impacted by rain. True by default, causes a 25% time decrease on average.- Parameters:
- rainInfluenced- if this hook is influenced by rain
 
- 
getStateGet the current state of this fish hook.- Returns:
- the fish hook state
 
- 
getWaitTimeint getWaitTime()Get the number of ticks the hook needs to wait for a fish to bite.- Returns:
- Number of ticks
 
- 
setWaitTimevoid setWaitTime(int ticks) Sets the number of ticks the hook needs to wait for a fish to bite.- Parameters:
- ticks- Number of ticks
 
 
-