Prevent minecart mounts from being broken by others

This commit is contained in:
Shaun Bennett 2014-09-02 19:03:14 -05:00
parent 2d5c676e1b
commit 2b3f6c9dbc

View File

@ -10,6 +10,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.vehicle.VehicleDamageEvent;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
@ -173,9 +174,9 @@ public class MountCart extends Mount<Minecart>
}
@EventHandler
public void cancelBreak(EntityDamageEvent event)
public void cancelBreak(VehicleDamageEvent event)
{
if (GetActive().values().contains(event.getEntity()))
if (GetActive().values().contains(event.getVehicle()))
event.setCancelled(true);
}
}