Class VehicleEvent

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

public class VehicleEvent extends Object implements org.bukkit.event.Listener
Listener that restricts rare entities from entering vehicles.

Cancels VehicleEnterEvent for boats and minecarts when the entering entity is a tracked rare. Provides an init helper to register this listener.

  • Constructor Details

    • VehicleEvent

      public VehicleEvent()
  • Method Details

    • init

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

      public void onVehicleEnter(org.bukkit.event.vehicle.VehicleEnterEvent event)
      Handles entity attempts to enter a vehicle. For supported vehicle types (boats and minecarts), cancels the event if the entering entity is a rare.
      Parameters:
      event - the vehicle enter event