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

    • EMPTY_MESSAGE_ARRAY

      public static final com.flowpowered.network.Message[] 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.
      Parameters:
      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
      Overrides:
      setShooter in class GlowProjectile
    • createSpawnMessage

      public List<com.flowpowered.network.Message> 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.
      Overrides:
      createSpawnMessage in class GlowProjectile
      Returns:
      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
      Parameters:
      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.
      Overrides:
      shouldSave in class GlowEntity
      Returns:
      True if the entity should be saved.
    • getBiteChance

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

      @Deprecated public void setBiteChance(double v) throws IllegalArgumentException
      Deprecated.
      Specified by:
      setBiteChance in interface org.bukkit.entity.FishHook
      Throws:
      IllegalArgumentException
    • 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.
      Overrides:
      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
      Overrides:
      getBoundingBox in class GlowEntity
    • setRotation

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

      public @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason()
      Specified by:
      getEntitySpawnReason in interface org.bukkit.entity.Entity
      Overrides:
      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