Forgot a file

This commit is contained in:
Evenprime 2011-02-17 21:48:32 +01:00
parent 125628cdd8
commit bc5985628e

View File

@ -0,0 +1,32 @@
package cc.co.evenprime.bukkit.nocheat;
import org.bukkit.event.vehicle.VehicleDamageEvent;
import org.bukkit.event.vehicle.VehicleExitEvent;
import org.bukkit.event.vehicle.VehicleListener;
/**
* Handle events for all Player related events
* @author Evenprime
*/
public class NoCheatPluginVehicleListener extends VehicleListener {
private final NoCheatPlugin plugin;
private final NoCheatPluginPlayerListener playerListener;
public NoCheatPluginVehicleListener(NoCheatPlugin plugin, NoCheatPluginPlayerListener playerListener) {
this.plugin = plugin;
this.playerListener = playerListener;
}
@Override
public void onVehicleExit(VehicleExitEvent event) {
playerListener.vehicleUpdate(event.getExited());
}
public void onVehicleDamage(VehicleDamageEvent event) {
playerListener.vehicleUpdate(event.getVehicle().getPassenger());
}
}