Interface FishingContext

All Superinterfaces:
EffectContext

public interface FishingContext extends EffectContext
Context for fishing-related enchantment effects.

Provides access to player, fishing rod, fish hook, caught items/entities, and fishing mechanics data during fishing events.

Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.entity.Entity
    Gets the caught entity, if any.
    @Nullable org.bukkit.entity.Item
    Gets the caught item, if any.
    @NotNull org.bukkit.inventory.ItemStack
    Gets the fishing rod item.
    @NotNull org.bukkit.entity.FishHook
    Gets the fish hook entity.
    @NotNull org.bukkit.Location
    Gets the location of the hook.
    int
    Gets the current lure speed.
    @NotNull org.bukkit.entity.Player
    Gets the player fishing.
    int
    Gets the current wait time.
    boolean
    Checks if an entity has been caught.
    boolean
    Checks if an item has been caught.
    boolean
    Checks if lure effects are being applied.
    boolean
    Checks if a fish has bitten.
    boolean
    Checks if the player is casting the line.
    boolean
    Checks if the player is reeling in.
    void
    setApplyLure(boolean apply)
    Sets whether lure enchantment effects apply.
    void
    setLureSpeed(int speed)
    Sets the lure speed modifier.
    void
    setWaitTime(int ticks)
    Sets the wait time for fish bite in ticks.

    Methods inherited from interface io.artificial.enchantments.api.context.EffectContext

    getEnchantment, getLevel, getScaledValue, isCancellable, isCancelled, tryCancel
  • Method Details

    • getPlayer

      @NotNull @NotNull org.bukkit.entity.Player getPlayer()
      Gets the player fishing.
      Returns:
      the fishing player
    • getFishingRod

      @NotNull @NotNull org.bukkit.inventory.ItemStack getFishingRod()
      Gets the fishing rod item.
      Returns:
      the fishing rod
    • getHook

      @NotNull @NotNull org.bukkit.entity.FishHook getHook()
      Gets the fish hook entity.
      Returns:
      the fish hook
    • getLocation

      @NotNull @NotNull org.bukkit.Location getLocation()
      Gets the location of the hook.
      Returns:
      the hook location
    • getCaughtItem

      @Nullable @Nullable org.bukkit.entity.Item getCaughtItem()
      Gets the caught item, if any.
      Returns:
      the caught item, or null
    • getCaughtEntity

      @Nullable org.bukkit.entity.Entity getCaughtEntity()
      Gets the caught entity, if any.
      Returns:
      the caught entity, or null
    • isCast

      boolean isCast()
      Checks if the player is casting the line.
      Returns:
      true if casting
    • isReel

      boolean isReel()
      Checks if the player is reeling in.
      Returns:
      true if reeling
    • isBite

      boolean isBite()
      Checks if a fish has bitten.
      Returns:
      true if fish biting
    • hasCaughtItem

      boolean hasCaughtItem()
      Checks if an item has been caught.
      Returns:
      true if caught item
    • hasCaughtEntity

      boolean hasCaughtEntity()
      Checks if an entity has been caught.
      Returns:
      true if caught entity
    • setWaitTime

      void setWaitTime(int ticks)
      Sets the wait time for fish bite in ticks.
      Parameters:
      ticks - the wait time
    • getWaitTime

      int getWaitTime()
      Gets the current wait time.
      Returns:
      the wait time in ticks
    • setLureSpeed

      void setLureSpeed(int speed)
      Sets the lure speed modifier.
      Parameters:
      speed - the lure speed
    • getLureSpeed

      int getLureSpeed()
      Gets the current lure speed.
      Returns:
      the lure speed
    • setApplyLure

      void setApplyLure(boolean apply)
      Sets whether lure enchantment effects apply.
      Parameters:
      apply - true to apply lure
    • isApplyLure

      boolean isApplyLure()
      Checks if lure effects are being applied.
      Returns:
      true if lure applies