Mineplex2018-withcommit/Patches/Bukkit-Patches/0030-Change-VehicleExitEvent-to-support-non-vechicles.patch
2015-10-21 05:05:27 +13:00

47 lines
1.5 KiB
Diff

From 0b2e6d55efca6de55c7e6dc48de65c7c4ffb6166 Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 21 Oct 2015 04:37:32 +1300
Subject: [PATCH] Change VehicleExitEvent to support non-vechicles
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
index 364451b..9d36cad 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java
@@ -1,21 +1,29 @@
package org.bukkit.event.vehicle;
+import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Vehicle;
import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Raised when a living entity exits a vehicle.
*/
-public class VehicleExitEvent extends VehicleEvent implements Cancellable {
+public class VehicleExitEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
private final LivingEntity exited;
+ private final Entity vehicle;
- public VehicleExitEvent(final Vehicle vehicle, final LivingEntity exited) {
- super(vehicle);
+ public VehicleExitEvent(final Entity vehicle, final LivingEntity exited) {
this.exited = exited;
+ this.vehicle = vehicle;
+ }
+
+ public Entity getVehicle()
+ {
+ return vehicle;
}
/**
--
1.9.5.msysgit.0