Class GlowFishingHook

All Implemented Interfaces:
net.kyori.adventure.audience.Audience, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.command.CommandSender, org.bukkit.entity.Entity, org.bukkit.entity.FishHook, org.bukkit.entity.Projectile, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder

public class GlowFishingHook extends GlowProjectile implements org.bukkit.entity.FishHook
  • Field Details


      public static final[] EMPTY_MESSAGE_ARRAY
  • Constructor Details

    • GlowFishingHook

      public GlowFishingHook(org.bukkit.Location location, org.bukkit.inventory.ItemStack itemStack, org.bukkit.entity.Player angler)
      Creates a fishing bob.
      location - the location
      itemStack - the fishing rod (used to handle enchantments) or null (equivalent to
      angler - the player who is casting this fish hook (must be set at spawn time)
  • Method Details

    • setShooter

      public void setShooter(org.bukkit.projectiles.ProjectileSource shooter)
      Specified by:
      setShooter in interface org.bukkit.entity.Projectile
      setShooter in class GlowProjectile
    • createSpawnMessage

      public List<> createSpawnMessage()
      Description copied from class: GlowEntity
      Creates a list of Messages which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.
      createSpawnMessage in class GlowProjectile
      A list of messages which can spawn this entity.
    • collide

      public void collide(org.bukkit.block.Block block)
      Description copied from class: GlowEntity
      Collide with the target block.
      Specified by:
      collide in class GlowProjectile
      block - a block whose type Material.isOccluding()
    • collide

      public void collide(org.bukkit.entity.LivingEntity entity)
      Specified by:
      collide in class GlowProjectile
    • getObjectId

      protected int getObjectId()
      Specified by:
      getObjectId in class GlowProjectile
    • shouldSave

      public boolean shouldSave()
      Description copied from class: GlowEntity
      Checks whether this entity should be saved as part of the world.
      shouldSave in class GlowEntity
      True if the entity should be saved.
    • getBiteChance

      @Deprecated public double getBiteChance()
      Specified by:
      getBiteChance in interface org.bukkit.entity.FishHook
    • setBiteChance

      @Deprecated public void setBiteChance(double v) throws IllegalArgumentException
      Specified by:
      setBiteChance in interface org.bukkit.entity.FishHook
    • isInOpenWater

      public boolean isInOpenWater()
      Specified by:
      isInOpenWater in interface org.bukkit.entity.FishHook
    • getHookedEntity

      public org.bukkit.entity.Entity getHookedEntity()
      Specified by:
      getHookedEntity in interface org.bukkit.entity.FishHook
    • setHookedEntity

      public void setHookedEntity(org.bukkit.entity.Entity entity)
      Specified by:
      setHookedEntity in interface org.bukkit.entity.FishHook
    • pullHookedEntity

      public boolean pullHookedEntity()
      Specified by:
      pullHookedEntity in interface org.bukkit.entity.FishHook
    • getState

      @NotNull public @NotNull org.bukkit.entity.FishHook.HookState getState()
      Specified by:
      getState in interface org.bukkit.entity.FishHook
    • pulse

      public void pulse()
      Description copied from class: GlowEntity
      Called every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.
      pulse in class GlowEntity
    • reelIn

      public void reelIn()
      Removes this fishing hook. Drops loot and xp if a player is fishing.
    • getBoundingBox

      @NotNull public @NotNull org.bukkit.util.BoundingBox getBoundingBox()
      Specified by:
      getBoundingBox in interface org.bukkit.entity.Entity
      getBoundingBox in class GlowEntity
    • setRotation

      public void setRotation(float yaw, float pitch)
      Specified by:
      setRotation in interface org.bukkit.entity.Entity
      setRotation in class GlowEntity
    • getEntitySpawnReason

      public @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason()
      Specified by:
      getEntitySpawnReason in interface org.bukkit.entity.Entity
      getEntitySpawnReason in class GlowEntity
    • getApplyLure

      public boolean getApplyLure()
      Specified by:
      getApplyLure in interface org.bukkit.entity.FishHook
    • getMinWaitTime

      public int getMinWaitTime()
      Specified by:
      getMinWaitTime in interface org.bukkit.entity.FishHook
    • setMinWaitTime

      public void setMinWaitTime(int minWaitTime)
      Specified by:
      setMinWaitTime in interface org.bukkit.entity.FishHook
    • getMaxWaitTime

      public int getMaxWaitTime()
      Specified by:
      getMaxWaitTime in interface org.bukkit.entity.FishHook
    • setMaxWaitTime

      public void setMaxWaitTime(int maxWaitTime)
      Specified by:
      setMaxWaitTime in interface org.bukkit.entity.FishHook
    • setApplyLure

      public void setApplyLure(boolean applyLure)
      Specified by:
      setApplyLure in interface org.bukkit.entity.FishHook