Package valorless.rarespawns.events
Class TameEvent
java.lang.Object
valorless.rarespawns.events.TameEvent
- All Implemented Interfaces:
org.bukkit.event.Listener
Handles events related to taming rare entities in the RareSpawns plugin.
Registers itself as a listener and customizes taming mechanics, including cooldowns,
custom items, sounds, and particles for rare entities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()Registers the TameEvent listener with the Bukkit plugin manager.voidonCustomEntityTame(org.bukkit.event.player.PlayerInteractEntityEvent event) Handles custom taming logic for rare entities using specific items and mechanics.voidonEntityTame(org.bukkit.event.entity.EntityTameEvent event) Handles vanilla taming attempts for rare entities.
-
Constructor Details
-
TameEvent
public TameEvent()
-
-
Method Details
-
init
public static void init()Registers the TameEvent listener with the Bukkit plugin manager. -
onEntityTame
public void onEntityTame(org.bukkit.event.entity.EntityTameEvent event) Handles vanilla taming attempts for rare entities. Cancels taming if the entity is marked as not tameable in its data.- Parameters:
event- The EntityTameEvent triggered by taming actions.
-
onCustomEntityTame
public void onCustomEntityTame(org.bukkit.event.player.PlayerInteractEntityEvent event) Handles custom taming logic for rare entities using specific items and mechanics. Applies cooldown, checks for correct item, and triggers custom sounds/particles.- Parameters:
event- The PlayerInteractEntityEvent triggered by player interaction.
-