Class TameEvent

java.lang.Object
valorless.rarespawns.events.TameEvent
All Implemented Interfaces:
org.bukkit.event.Listener

public class TameEvent extends Object implements 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Registers the TameEvent listener with the Bukkit plugin manager.
    void
    onCustomEntityTame(org.bukkit.event.player.PlayerInteractEntityEvent event)
    Handles custom taming logic for rare entities using specific items and mechanics.
    void
    onEntityTame(org.bukkit.event.entity.EntityTameEvent event)
    Handles vanilla taming attempts for rare entities.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.