package us.crast.flyingtub;

import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;

public class DamageListener implements Listener {
	@EventHandler(ignoreCancelled = true)
	public void onEntityDamage(EntityDamageEvent event) {
		if (event.getCause() != DamageCause.FALL) return;
		if (event.getEntity().getType() == EntityType.PLAYER) {	
			Player player = (Player) event.getEntity();
			if(player.isInsideVehicle() && player.getVehicle().getVelocity().length() > 0.01) {					
				event.setCancelled(true);
			}
		}
	}
}

@@ -53,20 +53,16 @@
 y.Entity
-Type
 ;%0Aimport
@@ -80,22 +80,26 @@
 .entity.
-Player
+EntityType
 ;%0Aimport
@@ -327,17 +327,204 @@
 tener %7B%0A
-%09
+    // If we're going at least this fast, ignore damage.%0A    // We use the velocity squared because it avoids a square root%0A%09private static final double MIN_SQUARE_VELOCITY = 0.0001;%0A%0A    
 @EventHa
@@ -662,20 +662,32 @@
 turn;%0A%09%09
-if (
+Entity entity = 
 event.ge
@@ -695,16 +695,30 @@
 Entity()
+;%0A%09%09if (entity
 .getType
@@ -747,110 +747,151 @@
 R) %7B
-%09
 %0A%09%09%09
-Player player = (Player) event.getEntity();%0A%09%09%09if(player.isInsideVehicle() && player.getV
+if (entity.isInsideVehicle()) %7B%0A%09%09%09    Entity vehicle = entity.getVehicle();%0A%09%09%09    if (vehicle.getType() == EntityType.MINECART && v
 ehicle
-()
 .get
@@ -911,30 +911,57 @@
 ngth
-() %3E 0.01
+Squared() %3E MIN_SQUARE_VELOCITY
 ) %7B%09%09%09
-%09%09
 %0A%09%09%09
-%09
+        
 even
@@ -982,16 +982,25 @@
 (true);%0A
+%09%09%09    %7D%0A
 %09%09%09%7D%0A%09%09%7D

Make some performance tweaks in the damage listener that'll potentially speed things up