Package valorless.rarespawns.ai
Class CustomBee
java.lang.Object
valorless.rarespawns.ai.CustomBee
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()Registers this listener with the server plugin manager.voidonBeeEnterHive(org.bukkit.event.entity.EntityEnterBlockEvent event) Blocks rare bees from entering beehives or bee nests.voidonBeeEnterHive(org.bukkit.event.entity.EntityInteractEvent event) Blocks rare bees from entering beehives or bee nests.voidonBeeHit(org.bukkit.event.entity.EntityDamageByEntityEvent event) When a rare bee is hit, keep it enraged and set its target to the attacker.voidonBeeRemoveHome(org.bukkit.event.entity.EntityInteractEvent event) Removes the hive assignment from rare bees to discourage homing behavior.voidonBeeTargetHive(org.bukkit.event.entity.EntityTargetEvent event) Cancels targeting of hive blocks for rare bees.
-
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
-