This commit is contained in:
samczsun 2017-03-09 19:48:31 -05:00 committed by cnr
parent fceda64a5a
commit be1e454d5c

View File

@ -178,7 +178,12 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
@EventHandler @EventHandler
public void cancelBreak(VehicleDamageEvent event) public void cancelBreak(VehicleDamageEvent event)
{ {
if (getActive().values().contains(event.getVehicle())) for (SingleEntityMountData<Minecart> data : getActive().values())
{
if (data.getEntity().equals(event.getVehicle()))
{
event.setCancelled(true); event.setCancelled(true);
} }
} }
}
}