From 9d860f7ef68654e5bcfe41238e5780846e646f48 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 15 Mar 2017 20:46:13 +1100 Subject: [PATCH] Make VehicleCreateEvent Cancellable. By: md_5 --- .../bukkit/event/vehicle/VehicleCreateEvent.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java index 22eda7277d..eb55c1f17d 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java @@ -1,18 +1,30 @@ package org.bukkit.event.vehicle; import org.bukkit.entity.Vehicle; +import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; /** * Raised when a vehicle is created. */ -public class VehicleCreateEvent extends VehicleEvent { +public class VehicleCreateEvent extends VehicleEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); + private boolean cancelled; public VehicleCreateEvent(final Vehicle vehicle) { super(vehicle); } + @Override + public boolean isCancelled() { + return cancelled; + } + + @Override + public void setCancelled(boolean cancelled) { + this.cancelled = cancelled; + } + @Override public HandlerList getHandlers() { return handlers;