Class CustomBee

java.lang.Object
valorless.rarespawns.ai.CustomBee
All Implemented Interfaces:
org.bukkit.event.Listener

public class CustomBee extends Object implements org.bukkit.event.Listener
Listener that adjusts default bee behavior for rare bees.

Prevents hive interactions and forces aggressive responses to damage.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Registers this listener with the server plugin manager.
    void
    onBeeEnterHive(org.bukkit.event.entity.EntityEnterBlockEvent event)
    Blocks rare bees from entering beehives or bee nests.
    void
    onBeeEnterHive(org.bukkit.event.entity.EntityInteractEvent event)
    Blocks rare bees from entering beehives or bee nests.
    void
    onBeeHit(org.bukkit.event.entity.EntityDamageByEntityEvent event)
    When a rare bee is hit, keep it enraged and set its target to the attacker.
    void
    onBeeRemoveHome(org.bukkit.event.entity.EntityInteractEvent event)
    Removes the hive assignment from rare bees to discourage homing behavior.
    void
    onBeeTargetHive(org.bukkit.event.entity.EntityTargetEvent event)
    Cancels targeting of hive blocks for rare bees.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomBee

      public CustomBee()
  • Method Details

    • init

      public static void init()
      Registers this listener with the server plugin manager.
    • onBeeEnterHive

      public void onBeeEnterHive(org.bukkit.event.entity.EntityInteractEvent event)
      Blocks rare bees from entering beehives or bee nests.
      Parameters:
      event - entity interacts with a block
    • onBeeEnterHive

      public void onBeeEnterHive(org.bukkit.event.entity.EntityEnterBlockEvent event)
      Blocks rare bees from entering beehives or bee nests.
      Parameters:
      event - entity interacts with a block
    • onBeeHit

      public void onBeeHit(org.bukkit.event.entity.EntityDamageByEntityEvent event)
      When a rare bee is hit, keep it enraged and set its target to the attacker.
      Parameters:
      event - entity damaged by entity event
    • onBeeRemoveHome

      public void onBeeRemoveHome(org.bukkit.event.entity.EntityInteractEvent event)
      Removes the hive assignment from rare bees to discourage homing behavior.
      Parameters:
      event - entity interacts with a block
    • onBeeTargetHive

      public void onBeeTargetHive(org.bukkit.event.entity.EntityTargetEvent event)
      Cancels targeting of hive blocks for rare bees.
      Parameters:
      event - entity target event