diff options
author | md_5 <git@md-5.net> | 2017-03-15 20:46:13 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-03-15 20:46:13 +1100 |
commit | dd4b40424c2afeca8bb5f5bb6234db1ee35933f6 (patch) | |
tree | 5ada9e68726c3ec083cbb7dc0252b094150ed01a /src/main/java/org | |
parent | a080ce05bb78381e8f4561da1e6f933283506b43 (diff) | |
download | bukkit-dd4b40424c2afeca8bb5f5bb6234db1ee35933f6.tar bukkit-dd4b40424c2afeca8bb5f5bb6234db1ee35933f6.tar.gz bukkit-dd4b40424c2afeca8bb5f5bb6234db1ee35933f6.tar.lz bukkit-dd4b40424c2afeca8bb5f5bb6234db1ee35933f6.tar.xz bukkit-dd4b40424c2afeca8bb5f5bb6234db1ee35933f6.zip |
Make VehicleCreateEvent Cancellable.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java index 22eda727..eb55c1f1 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java @@ -1,19 +1,31 @@ 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; } |