org.bukkit.event.vehicle.VehicleEnterEvent Maven / Gradle / Ivy
package org.bukkit.event.vehicle;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Vehicle;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/**
* Raised when an entity enters a vehicle.
*/
public class VehicleEnterEvent extends VehicleEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final Entity entered;
private boolean cancelled;
public VehicleEnterEvent(final Vehicle vehicle, final Entity entered) {
super(vehicle);
this.entered = entered;
}
public static HandlerList getHandlerList() {
return handlers;
}
/**
* Gets the Entity that entered the vehicle.
*
* @return the Entity that entered the vehicle
*/
public Entity getEntered() {
return entered;
}
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy